forked from aniani/vim
patch 8.1.2274: newlines in 'balloonexpr' result only work in the GUI
Problem: Newlines in 'balloonexpr' result only work in the GUI. Solution: Also recognize newlines in the terminal. (closes #5193)
This commit is contained in:
@@ -1130,7 +1130,7 @@ split_message(char_u *mesg, pumitem_T **array)
|
||||
int item_idx;
|
||||
int indent = 0;
|
||||
int max_cells = 0;
|
||||
int max_height = Rows / 2 - 2;
|
||||
int max_height = Rows / 2 - 1;
|
||||
int long_item_count = 0;
|
||||
int split_long_items = FALSE;
|
||||
|
||||
@@ -1150,6 +1150,8 @@ split_message(char_u *mesg, pumitem_T **array)
|
||||
{
|
||||
if (*p == '"')
|
||||
quoted = !quoted;
|
||||
else if (*p == '\n')
|
||||
break;
|
||||
else if (*p == '\\' && p[1] != NUL)
|
||||
++p;
|
||||
else if (!quoted)
|
||||
@@ -1170,6 +1172,8 @@ split_message(char_u *mesg, pumitem_T **array)
|
||||
p += mb_ptr2len(p);
|
||||
}
|
||||
item->bytelen = p - item->start;
|
||||
if (*p == '\n')
|
||||
++p;
|
||||
if (item->cells > max_cells)
|
||||
max_cells = item->cells;
|
||||
long_item_count += (item->cells - 1) / BALLOON_MIN_WIDTH;
|
||||
|
Reference in New Issue
Block a user