changeset: 6922:142a87f0c855
user:      Kevin McCarthy <ke...@8t8.us>
date:      Tue Jan 31 15:02:21 2017 -0800
link:      http://dev.mutt.org/hg/mutt/rev/142a87f0c855

Minor fix to ~y completion.

Make sure the entire ~y is before curpos when enabling completion.

diffs (12 lines):

diff -r 82034c72b6da -r 142a87f0c855 enter.c
--- a/enter.c   Tue Jan 31 14:27:36 2017 -0800
+++ b/enter.c   Tue Jan 31 15:02:21 2017 -0800
@@ -587,7 +587,7 @@
           {
             for (i = state->curpos; i && state->wbuf[i-1] != '~'; i--)
               ;
-            if (i && state->wbuf[i-1] == '~' && state->wbuf[i] == 'y')
+            if (i && i < state->curpos && state->wbuf[i-1] == '~' && 
state->wbuf[i] == 'y')
             {
               i++;
               my_wcstombs (buf, buflen, state->wbuf + i, state->curpos - i);

Reply via email to