Hi Dominique!
On Do, 25 Dez 2014, Dominique Pellé wrote:
> You're quick! ... but too quick :-)
>
> Your patch contains changes in getchar.c and ui.c
> which seem unrelated to this issue. Right?
Yes, some other changes I am working on. I shouldn't post patches, right
before I am going to sleep...
> The change in screen.c looks like the relevant
> piece. But it does not work. It changes the
> behavior, but the cursor still appears before
> the end of line. Did it work for you?
Yes, it appeared to work for me. Here is a better version, that works
for me and also handles correctly multibyte chars for the showbreak
setting (a problem, that I have previously caused and needed to be fixed
by 7.4.478):
diff --git a/src/screen.c b/src/screen.c
--- a/src/screen.c
+++ b/src/screen.c
@@ -4516,9 +4516,14 @@ win_line(wp, lnum, startrow, endrow, noc
if (c == TAB && (!wp->w_p_list || lcs_tab1))
{
int tab_len = 0;
+ long vcol_adjusted = vcol; /* removed showbreak length */
+#ifdef FEAT_LINEBREAK
+ if (*p_sbr != NUL && vcol > W_WIDTH(wp))
+ vcol_adjusted = vcol - MB_CHARLEN(p_sbr);
+#endif
/* 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_adjusted %
(int)wp->w_buffer->b_p_ts - 1;
#ifdef FEAT_LINEBREAK
if (!wp->w_p_lbr || !wp->w_p_list)
#endif
Please check that this works for you as well. If this works, I'll create
a test case for this as well.
Best,
Christian
--
Nicht jeder, der fest im Sattel sitzt, kann auch reiten.
-- Kim Snolden
--
--
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.