Compare commits

...

3 Commits

Author SHA1 Message Date
Bram Moolenaar
d836bb90ab updated for version 7.2.342
Problem:    Popup menu displayed wrong in 'rightleft' mode when there are
            multi-byte characters.
Solution:   Adjust the column computations. (Dominique Pelle)
2010-01-19 18:06:03 +01:00
Bram Moolenaar
e4ebd29ea9 updated for version 7.2.341
Problem:    Popup menu wraps to next line when double-wide character doesn't
            fit. (Jiang Ma)
Solution:   Display a ">" instead. (Dominique Pelle)
2010-01-19 17:40:46 +01:00
Bram Moolenaar
3ee0229f64 updated for version 7.2.340
Problem:    Gcc warning for condition that can never be true. (James Vega)
Solution:   Use start_lvl instead flp->lvl.
2010-01-19 17:24:25 +01:00
4 changed files with 40 additions and 12 deletions

View File

@@ -3239,8 +3239,8 @@ foldlevelMarker(flp)
flp->lvl = n;
flp->lvl_next = n - 1;
/* never start a fold with an end marker */
if (flp->lvl_next > flp->lvl)
flp->lvl_next = flp->lvl;
if (flp->lvl_next > start_lvl)
flp->lvl_next = start_lvl;
}
}
else

View File

@@ -345,21 +345,36 @@ pum_redraw()
if (st != NULL)
{
char_u *rt = reverse_text(st);
char_u *rt_saved = rt;
int len, j;
if (rt != NULL)
{
len = (int)STRLEN(rt);
if (len > pum_width)
char_u *rt_start = rt;
int size;
size = vim_strsize(rt);
if (size > pum_width)
{
for (j = pum_width; j < len; ++j)
do
{
size -= has_mbyte
? (*mb_ptr2cells)(rt) : 1;
mb_ptr_adv(rt);
len = pum_width;
} while (size > pum_width);
if (size < pum_width)
{
/* Most left character requires
* 2-cells but only 1 cell is
* available on screen. Put a
* '<' on the left of the pum
* item */
*(--rt) = '<';
size++;
}
}
screen_puts_len(rt, len, row,
col - len + 1, attr);
vim_free(rt_saved);
screen_puts_len(rt, (int)STRLEN(rt),
row, col - size + 1, attr);
vim_free(rt_start);
}
vim_free(st);
}

View File

@@ -6434,6 +6434,13 @@ screen_puts_len(text, len, row, col, attr)
else
prev_c = u8c;
# endif
if (col + mbyte_cells > screen_Columns)
{
/* Only 1 cell left, but character requires 2 cells:
* display a '>' in the last column to avoid wrapping. */
c = '>';
mbyte_cells = 1;
}
}
}
#endif
@@ -9210,7 +9217,7 @@ unshowmode(force)
int force;
{
/*
* Don't delete it right now, when not redrawing or insided a mapping.
* Don't delete it right now, when not redrawing or inside a mapping.
*/
if (!redrawing() || (!force && char_avail() && !KeyTyped))
redraw_cmdline = TRUE; /* delete mode later */

View File

@@ -681,6 +681,12 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
342,
/**/
341,
/**/
340,
/**/
339,
/**/