diff options
Diffstat (limited to 'Src/Zle')
-rw-r--r-- | Src/Zle/zle_move.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/Src/Zle/zle_move.c b/Src/Zle/zle_move.c index a60b4dfd0..1238c1834 100644 --- a/Src/Zle/zle_move.c +++ b/Src/Zle/zle_move.c @@ -420,10 +420,12 @@ virepeatfind(char **args) return ret; } while (n--) { - do + do { zlecs += vfinddir; - while (zlecs >= 0 && zlecs < zlell && zleline[zlecs] != vfindchar && zleline[zlecs] != '\n'); - if (zlecs < 0 || zlecs >= zlell || zleline[zlecs] == '\n') { + } while (zlecs >= 0 && zlecs < zlell + && (ZLE_INT_T)zleline[zlecs] != vfindchar + && zleline[zlecs] != ZWC('\n')); + if (zlecs < 0 || zlecs >= zlell || zleline[zlecs] == ZWC('\n')) { zlecs = ocs; return 1; } |