about summary refs log tree commit diff
path: root/Src/Zle/zle_move.c
diff options
context:
space:
mode:
authorBarton E. Schaefer <schaefer@zsh.org>2015-08-22 21:50:31 -0700
committerBarton E. Schaefer <schaefer@zsh.org>2015-08-22 21:50:31 -0700
commit1cfe4ca1926bc2c8041290bb0d8c3dccf8662f52 (patch)
tree835a9e3b3a32bfe6ed89a9652fc3c8b8d71bcc49 /Src/Zle/zle_move.c
parent2ed3b84fa65b949bfea8895ab287011042fae8fb (diff)
downloadzsh-1cfe4ca1926bc2c8041290bb0d8c3dccf8662f52.tar.gz
zsh-1cfe4ca1926bc2c8041290bb0d8c3dccf8662f52.tar.xz
zsh-1cfe4ca1926bc2c8041290bb0d8c3dccf8662f52.zip
36273: teach endofline() and endoflinehist() about invicmdmode() cursor placement.
Diffstat (limited to 'Src/Zle/zle_move.c')
-rw-r--r--Src/Zle/zle_move.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/Src/Zle/zle_move.c b/Src/Zle/zle_move.c
index f49df8647..155fda80d 100644
--- a/Src/Zle/zle_move.c
+++ b/Src/Zle/zle_move.c
@@ -344,6 +344,8 @@ endofline(char **args)
 	    zlecs = zlell;
 	    return 0;
 	}
+	if ((zlecs += invicmdmode()) == zlell)
+	    break;
 	if (zleline[zlecs] == '\n')
 	    if (++zlecs == zlell)
 		return 0;
@@ -414,6 +416,8 @@ endoflinehist(char **args)
 	    zlecs = zlell;
 	    break;
 	}
+	if ((zlecs += invicmdmode()) == zlell)
+	    break;
 	if (zleline[zlecs] == '\n')
 	    if (++zlecs == zlell)
 		break;