Hi Dominique!
On Mi, 24 Dez 2014, Dominique Pellé wrote:
> Hi
>
> I see a bug with Vim-7.4.460. Steps to reproduce:
>
> $ vim -u NONE -c 'set showbreak=: columns=95' bug-vim.txt
>
> ... where "bug-vim.txt" is the attached file. Then in
> command mode, press A to append text at the end
> of the line.
>
> Observe that cursor is positioned before the end of
> line (bug!). Appending characters appends at the end
> of line, but cursor remains at the wrong position
> before the end of line.
>
> Bug only happens with columns=95 with this file, which
> corresponds to having a tab displayed at the beginning
> of a wrapped line.
Can you try the attached patch?
Kind regards,
Christian
--
Wie man sein Kind nicht nennen sollte:
Bred R. Zaun
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.
diff --git a/src/getchar.c b/src/getchar.c
--- a/src/getchar.c
+++ b/src/getchar.c
@@ -3707,9 +3707,9 @@ do_map(maptype, arg, mode, abbrev)
{
if (!did_it)
retval = 2; /* no match */
- else if (*keys == Ctrl_C && mapped_ctrl_c)
+ else if (*keys == Ctrl_C)
/* If CTRL-C has been unmapped, reuse it for Interrupting. */
- mapped_ctrl_c--;
+ mapped_ctrl_c &= ~mode;
goto theend;
}
@@ -3744,7 +3744,7 @@ do_map(maptype, arg, mode, abbrev)
/* If CTRL-C has been mapped, don't always use it for Interrupting. */
if (*keys == Ctrl_C)
- mapped_ctrl_c++;
+ mapped_ctrl_c |= mode;
mp->m_keys = vim_strsave(keys);
mp->m_str = vim_strsave(rhs);
diff --git a/src/screen.c b/src/screen.c
--- a/src/screen.c
+++ b/src/screen.c
@@ -4512,7 +4512,7 @@ win_line(wp, lnum, startrow, endrow, noc
int tab_len = 0;
/* tab amount depends on current column */
tab_len = (int)wp->w_buffer->b_p_ts
- - vcol % (int)wp->w_buffer->b_p_ts - 1;
+ - (vcol - (vcol > W_WIDTH(wp) && *p_sbr != NUL ? STRLEN(p_sbr) : 0)) % (int)wp->w_buffer->b_p_ts - 1;
#ifdef FEAT_LINEBREAK
if (!wp->w_p_lbr || !wp->w_p_list)
#endif
diff --git a/src/search.c b/src/search.c
--- a/src/search.c
+++ b/src/search.c
@@ -3933,7 +3933,7 @@ again:
if (lt(end_pos, start_pos))
curwin->w_cursor = start_pos;
else if (*p_sel == 'e')
- ++curwin->w_cursor.col;
+ inc_cursor();
VIsual = start_pos;
VIsual_mode = 'v';
redraw_curbuf_later(INVERTED); /* update the inversion */
diff --git a/src/ui.c b/src/ui.c
--- a/src/ui.c
+++ b/src/ui.c
@@ -180,7 +180,7 @@ ui_inchar(buf, maxlen, wtime, tb_change_
/* ... there is no need for CTRL-C to interrupt something, don't let
* it set got_int when it was mapped. */
- if (mapped_ctrl_c)
+ if (mapped_ctrl_c & State)
ctrl_c_interrupts = FALSE;
}