diff options
author | Přemysl Janouch <p.janouch@gmail.com> | 2017-06-26 04:19:42 +0200 |
---|---|---|
committer | Přemysl Janouch <p.janouch@gmail.com> | 2017-06-26 04:19:42 +0200 |
commit | 7d414c76470c55b9b517e7a990fa23121da645ad (patch) | |
tree | c6631aa9d9af6fc51c758818e7f7a316a1151a2c | |
parent | 33f5ba0b60a0d60bd63e3bde1e07fc2a2ffc456a (diff) | |
download | nncmpp-7d414c76470c55b9b517e7a990fa23121da645ad.tar.gz nncmpp-7d414c76470c55b9b517e7a990fa23121da645ad.tar.xz nncmpp-7d414c76470c55b9b517e7a990fa23121da645ad.zip |
Make left/right skip non-spacing characters
-rw-r--r-- | nncmpp.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -1685,12 +1685,16 @@ app_editor_process_action (enum action action) case ACTION_EDITOR_B_CHAR: if (g.editor_point < 1) return false; - g.editor_point--; + do g.editor_point--; + while (g.editor_point > 0 + && !g.editor_w[g.editor_point]); return true; case ACTION_EDITOR_F_CHAR: if (g.editor_point + 1 > (int) g.editor_len) return false; - g.editor_point++; + do g.editor_point++; + while (g.editor_point < (int) g.editor_len + && !g.editor_w[g.editor_point]); return true; case ACTION_EDITOR_B_WORD: { |