mirror of
https://github.com/vim/vim.git
synced 2025-09-28 04:24:06 -04:00
updated for version 7.0144
This commit is contained in:
@@ -4,3 +4,6 @@ These are functions used by plugins and for general use. They will be loaded
|
|||||||
automatically when the function is invoked. See ":help autoload".
|
automatically when the function is invoked. See ":help autoload".
|
||||||
|
|
||||||
gzip.vim for editing compressed files
|
gzip.vim for editing compressed files
|
||||||
|
|
||||||
|
Occult completion files:
|
||||||
|
ccomplete.vim C
|
||||||
|
@@ -168,11 +168,11 @@ msg_attr_keep(s, attr, keep)
|
|||||||
keep_msg = NULL;
|
keep_msg = NULL;
|
||||||
|
|
||||||
/* Truncate the message if needed. */
|
/* Truncate the message if needed. */
|
||||||
buf = msg_strtrunc(s);
|
msg_start();
|
||||||
|
buf = msg_strtrunc(s, FALSE);
|
||||||
if (buf != NULL)
|
if (buf != NULL)
|
||||||
s = buf;
|
s = buf;
|
||||||
|
|
||||||
msg_start();
|
|
||||||
msg_outtrans_attr(s, attr);
|
msg_outtrans_attr(s, attr);
|
||||||
msg_clr_eos();
|
msg_clr_eos();
|
||||||
retval = msg_end();
|
retval = msg_end();
|
||||||
@@ -194,19 +194,25 @@ msg_attr_keep(s, attr, keep)
|
|||||||
* Returns an allocated string or NULL when no truncating is done.
|
* Returns an allocated string or NULL when no truncating is done.
|
||||||
*/
|
*/
|
||||||
char_u *
|
char_u *
|
||||||
msg_strtrunc(s)
|
msg_strtrunc(s, force)
|
||||||
char_u *s;
|
char_u *s;
|
||||||
|
int force; /* always truncate */
|
||||||
{
|
{
|
||||||
char_u *buf = NULL;
|
char_u *buf = NULL;
|
||||||
int len;
|
int len;
|
||||||
int room;
|
int room;
|
||||||
|
|
||||||
/* May truncate message to avoid a hit-return prompt */
|
/* May truncate message to avoid a hit-return prompt */
|
||||||
if (!msg_scroll && !need_wait_return && shortmess(SHM_TRUNCALL)
|
if ((!msg_scroll && !need_wait_return && shortmess(SHM_TRUNCALL)
|
||||||
&& !exmode_active && msg_silent == 0)
|
&& !exmode_active && msg_silent == 0) || force)
|
||||||
{
|
{
|
||||||
len = vim_strsize(s);
|
len = vim_strsize(s);
|
||||||
room = (int)(Rows - cmdline_row - 1) * Columns + sc_col - 1;
|
if (msg_scrolled)
|
||||||
|
/* Use all the columns. */
|
||||||
|
room = (int)(Rows - msg_row) * Columns - 1;
|
||||||
|
else
|
||||||
|
/* Use up to 'showcmd' column. */
|
||||||
|
room = (int)(Rows - msg_row - 1) * Columns + sc_col - 1;
|
||||||
if (len > room && room > 0)
|
if (len > room && room > 0)
|
||||||
{
|
{
|
||||||
#ifdef FEAT_MBYTE
|
#ifdef FEAT_MBYTE
|
||||||
|
Reference in New Issue
Block a user