mirror of
https://github.com/neovim/neovim.git
synced 2025-11-13 13:59:16 +00:00
Merge #10349 from janlazo/vim-8.0.0935
vim-patch:8.0.{935,1013,1100,1119}
This commit is contained in:
@@ -438,6 +438,7 @@ When listing mappings the characters in the first two columns are:
|
||||
i Insert
|
||||
l ":lmap" mappings for Insert, Command-line and Lang-Arg
|
||||
c Command-line
|
||||
t Terminal-Job
|
||||
|
||||
Just before the {rhs} a special character can appear:
|
||||
* indicates that it is not remappable
|
||||
@@ -536,9 +537,9 @@ scenario: >
|
||||
:imap <M-C> foo
|
||||
:set encoding=utf-8
|
||||
The mapping for <M-C> is defined with the latin1 encoding, resulting in a 0xc3
|
||||
byte. If you type the character <EFBFBD> (0xe1 <M-a>) in UTF-8 encoding this is the
|
||||
byte. If you type the character á (0xe1 <M-a>) in UTF-8 encoding this is the
|
||||
two bytes 0xc3 0xa1. You don't want the 0xc3 byte to be mapped then or
|
||||
otherwise it would be impossible to type the <EFBFBD> character.
|
||||
otherwise it would be impossible to type the á character.
|
||||
|
||||
*<Leader>* *mapleader*
|
||||
To define a mapping which uses the "mapleader" variable, the special string
|
||||
|
||||
@@ -2605,14 +2605,22 @@ void buflist_list(exarg_T *eap)
|
||||
continue;
|
||||
}
|
||||
|
||||
const int changed_char = (buf->b_flags & BF_READERR)
|
||||
? 'x'
|
||||
: (bufIsChanged(buf) ? '+' : ' ');
|
||||
const int ro_char = !MODIFIABLE(buf)
|
||||
? '-'
|
||||
: (buf->b_p_ro ? '=' : ' ');
|
||||
|
||||
msg_putchar('\n');
|
||||
len = vim_snprintf((char *)IObuff, IOSIZE - 20, "%3d%c%c%c%c%c \"%s\"",
|
||||
len = vim_snprintf(
|
||||
(char *)IObuff, IOSIZE - 20, "%3d%c%c%c%c%c \"%s\"",
|
||||
buf->b_fnum,
|
||||
buf->b_p_bl ? ' ' : 'u',
|
||||
buf == curbuf ? '%' : (curwin->w_alt_fnum == buf->b_fnum ? '#' : ' '),
|
||||
buf->b_ml.ml_mfp == NULL ? ' ' : (buf->b_nwindows == 0 ? 'h' : 'a'),
|
||||
!MODIFIABLE(buf) ? '-' : (buf->b_p_ro ? '=' : ' '),
|
||||
(buf->b_flags & BF_READERR) ? 'x' : (bufIsChanged(buf) ? '+' : ' '),
|
||||
ro_char,
|
||||
changed_char,
|
||||
NameBuff);
|
||||
|
||||
if (len > IOSIZE - 20) {
|
||||
@@ -5233,8 +5241,8 @@ char_u *buf_spname(buf_T *buf)
|
||||
// There is no _file_ when 'buftype' is "nofile", b_sfname
|
||||
// contains the name as specified by the user.
|
||||
if (bt_nofile(buf)) {
|
||||
if (buf->b_sfname != NULL) {
|
||||
return buf->b_sfname;
|
||||
if (buf->b_fname != NULL) {
|
||||
return buf->b_fname;
|
||||
}
|
||||
return (char_u *)_("[Scratch]");
|
||||
}
|
||||
|
||||
@@ -2798,6 +2798,12 @@ return {
|
||||
addr_type=ADDR_LINES,
|
||||
func='ex_tag',
|
||||
},
|
||||
{
|
||||
command='tmenu',
|
||||
flags=bit.bor(RANGE, NOTADR, ZEROR, EXTRA, TRLBAR, NOTRLCOM, USECTRLV, CMDWIN),
|
||||
addr_type=ADDR_LINES,
|
||||
func='ex_menu',
|
||||
},
|
||||
{
|
||||
command='tmap',
|
||||
flags=bit.bor(EXTRA, TRLBAR, NOTRLCOM, USECTRLV, CMDWIN),
|
||||
@@ -2810,12 +2816,6 @@ return {
|
||||
addr_type=ADDR_LINES,
|
||||
func='ex_mapclear',
|
||||
},
|
||||
{
|
||||
command='tmenu',
|
||||
flags=bit.bor(RANGE, NOTADR, ZEROR, EXTRA, TRLBAR, NOTRLCOM, USECTRLV, CMDWIN),
|
||||
addr_type=ADDR_LINES,
|
||||
func='ex_menu',
|
||||
},
|
||||
{
|
||||
command='tnext',
|
||||
flags=bit.bor(RANGE, NOTADR, BANG, TRLBAR, ZEROR),
|
||||
@@ -2858,18 +2858,18 @@ return {
|
||||
addr_type=ADDR_LINES,
|
||||
func='ex_tag',
|
||||
},
|
||||
{
|
||||
command='tunmap',
|
||||
flags=bit.bor(EXTRA, TRLBAR, NOTRLCOM, USECTRLV, CMDWIN),
|
||||
addr_type=ADDR_LINES,
|
||||
func='ex_unmap',
|
||||
},
|
||||
{
|
||||
command='tunmenu',
|
||||
flags=bit.bor(EXTRA, TRLBAR, NOTRLCOM, USECTRLV, CMDWIN),
|
||||
addr_type=ADDR_LINES,
|
||||
func='ex_menu',
|
||||
},
|
||||
{
|
||||
command='tunmap',
|
||||
flags=bit.bor(EXTRA, TRLBAR, NOTRLCOM, USECTRLV, CMDWIN),
|
||||
addr_type=ADDR_LINES,
|
||||
func='ex_unmap',
|
||||
},
|
||||
{
|
||||
command='undo',
|
||||
flags=bit.bor(RANGE, NOTADR, COUNT, ZEROR, TRLBAR, CMDWIN),
|
||||
|
||||
@@ -269,14 +269,14 @@ void update_curbuf(int type)
|
||||
/// and redraw_all_later() to mark parts of the screen as needing a redraw.
|
||||
///
|
||||
/// @param type set to a NOT_VALID to force redraw of entire screen
|
||||
void update_screen(int type)
|
||||
int update_screen(int type)
|
||||
{
|
||||
static int did_intro = FALSE;
|
||||
int did_one;
|
||||
|
||||
// Don't do anything if the screen structures are (not yet) valid.
|
||||
if (!default_grid.chars) {
|
||||
return;
|
||||
return FAIL;
|
||||
}
|
||||
|
||||
if (must_redraw) {
|
||||
@@ -299,9 +299,10 @@ void update_screen(int type)
|
||||
if (!redrawing() || updating_screen) {
|
||||
redraw_later(type); /* remember type for next time */
|
||||
must_redraw = type;
|
||||
if (type > INVERTED_ALL)
|
||||
curwin->w_lines_valid = 0; /* don't use w_lines[].wl_size now */
|
||||
return;
|
||||
if (type > INVERTED_ALL) {
|
||||
curwin->w_lines_valid = 0; // don't use w_lines[].wl_size now
|
||||
}
|
||||
return FAIL;
|
||||
}
|
||||
|
||||
updating_screen = TRUE;
|
||||
@@ -511,6 +512,7 @@ void update_screen(int type)
|
||||
|
||||
// either cmdline is cleared, not drawn or mode is last drawn
|
||||
cmdline_was_last_drawn = false;
|
||||
return OK;
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user