diff --git a/dist/neoeedit.jar b/dist/neoeedit.jar index b44dc9e..0676428 100644 Binary files a/dist/neoeedit.jar and b/dist/neoeedit.jar differ diff --git a/src/neoe/ne/PlainPage.java b/src/neoe/ne/PlainPage.java index 9019c5f..ff35491 100644 --- a/src/neoe/ne/PlainPage.java +++ b/src/neoe/ne/PlainPage.java @@ -220,6 +220,14 @@ private void doMoveViewUp ( ) { sy = Math . max ( 0 , sy - 1 ) ; } + private void doMoveViewPageDown ( ) { + sy = Math . min ( sy + showLineCnt , pageData . roLines . getLinesize ( ) - 1 ) ; + } + + private void doMoveViewPageUp ( ) { + sy = Math . max ( 0 , sy - showLineCnt ) ; + } + /* let cursor get see */ public void focusCursor ( ) { sy = U . between ( U . between ( sy , cy - showLineCnt + 3 , cy - 3 ) , 0 , pageData . roLines . getLinesize ( ) - 1 ) ; @@ -541,12 +549,20 @@ void processCommand ( Commands cmd ) throws Exception { U . reloadWithEncodingByUser ( this ) ; break ; case moveLeft : - cursor . moveLeft ( ) ; - focusCursor ( ) ; + if ( readonly ) + doMoveViewPageUp ( ) ; + else { + cursor . moveLeft ( ) ; + focusCursor ( ) ; + } break ; case moveRight : - cursor . moveRight ( ) ; - focusCursor ( ) ; + if ( readonly ) + doMoveViewPageDown ( ) ; + else { + cursor . moveRight ( ) ; + focusCursor ( ) ; + } break ; case moveUp : if ( readonly ) @@ -574,7 +590,7 @@ void processCommand ( Commands cmd ) throws Exception { break ; case movePageUp : if ( readonly ) - sy = Math . max ( 0 , sy - showLineCnt ) ; + doMoveViewPageUp ( ) ; else { cursor . movePageUp ( ) ; focusCursor ( ) ; @@ -582,7 +598,7 @@ void processCommand ( Commands cmd ) throws Exception { break ; case movePageDown : if ( readonly ) - sy = Math . min ( sy + showLineCnt , pageData . roLines . getLinesize ( ) - 1 ) ; + doMoveViewPageDown ( ) ; else { cursor . movePageDown ( ) ; focusCursor ( ) ; @@ -812,7 +828,7 @@ void processCommand ( Commands cmd ) throws Exception { public void repaint ( ) { new Thread ( ( ) -> uiComp . repaint ( ) ) . start ( ) ; - // SwingUtilities . invokeLater ( ) ; + // SwingUtilities . invokeLater ( ) ; } private void unknownCommand ( KeyEvent env ) { diff --git a/src/neoe/ne/U.java b/src/neoe/ne/U.java index 7f8413c..782a707 100644 --- a/src/neoe/ne/U.java +++ b/src/neoe/ne/U.java @@ -1343,7 +1343,7 @@ public static Commands mappingToCommand ( KeyEvent env ) { if ( kc == KeyEvent . VK_SHIFT || kc == KeyEvent . VK_CONTROL || kc == KeyEvent . VK_ALT ) // fast pass return null ; String name = getKeyName ( env ) ; - // System.out.println("key name=" + name); + // System . out . println ( "key name=" + name ) ; Commands cmd = keys . get ( name ) ; return cmd ; } diff --git a/src/neoe/ne/Version.java b/src/neoe/ne/Version.java index a7fba0b..4350264 100644 --- a/src/neoe/ne/Version.java +++ b/src/neoe/ne/Version.java @@ -1,6 +1,6 @@ package neoe . ne ; public class Version { - public static final String REV = "v380rc6" . toString ( ) ; // β + public static final String REV = "v380" . toString ( ) ; // β public static final String CONFIG_FN = "/data.py.ver37" . toString ( ) ; }