Make left/right skip non-spacing characters

This commit is contained in:
Přemysl Eric Janouch 2017-06-26 04:19:42 +02:00
parent 33f5ba0b60
commit 7d414c7647
Signed by: p
GPG Key ID: B715679E3A361BE6

View File

@ -1685,12 +1685,16 @@ app_editor_process_action (enum action action)
case ACTION_EDITOR_B_CHAR: case ACTION_EDITOR_B_CHAR:
if (g.editor_point < 1) if (g.editor_point < 1)
return false; return false;
g.editor_point--; do g.editor_point--;
while (g.editor_point > 0
&& !g.editor_w[g.editor_point]);
return true; return true;
case ACTION_EDITOR_F_CHAR: case ACTION_EDITOR_F_CHAR:
if (g.editor_point + 1 > (int) g.editor_len) if (g.editor_point + 1 > (int) g.editor_len)
return false; 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; return true;
case ACTION_EDITOR_B_WORD: case ACTION_EDITOR_B_WORD:
{ {