summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvimboss <devnull@localhost>2005-09-09 19:44:31 +0000
committervimboss <devnull@localhost>2005-09-09 19:44:31 +0000
commitd0447afe675a1ccb1bd31393f228c2240fa4329e (patch)
tree8add1e7c30cb8a0b962db878e8976217682387e7
parent21ab3547975a76558ebd5e90920f6e5ab1275ef1 (diff)
downloadvim-d0447afe675a1ccb1bd31393f228c2240fa4329e.tar.gz
updated for version 7.0144
-rw-r--r--runtime/autoload/README.txt3
-rw-r--r--src/message.c18
2 files changed, 15 insertions, 6 deletions
diff --git a/runtime/autoload/README.txt b/runtime/autoload/README.txt
index 03819955..0c7fcfe3 100644
--- a/runtime/autoload/README.txt
+++ b/runtime/autoload/README.txt
@@ -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".
gzip.vim for editing compressed files
+
+Occult completion files:
+ccomplete.vim C
diff --git a/src/message.c b/src/message.c
index cca8a524..b5329bc9 100644
--- a/src/message.c
+++ b/src/message.c
@@ -168,11 +168,11 @@ msg_attr_keep(s, attr, keep)
keep_msg = NULL;
/* Truncate the message if needed. */
- buf = msg_strtrunc(s);
+ msg_start();
+ buf = msg_strtrunc(s, FALSE);
if (buf != NULL)
s = buf;
- msg_start();
msg_outtrans_attr(s, attr);
msg_clr_eos();
retval = msg_end();
@@ -194,19 +194,25 @@ msg_attr_keep(s, attr, keep)
* Returns an allocated string or NULL when no truncating is done.
*/
char_u *
-msg_strtrunc(s)
+msg_strtrunc(s, force)
char_u *s;
+ int force; /* always truncate */
{
char_u *buf = NULL;
int len;
int room;
/* May truncate message to avoid a hit-return prompt */
- if (!msg_scroll && !need_wait_return && shortmess(SHM_TRUNCALL)
- && !exmode_active && msg_silent == 0)
+ if ((!msg_scroll && !need_wait_return && shortmess(SHM_TRUNCALL)
+ && !exmode_active && msg_silent == 0) || force)
{
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)
{
#ifdef FEAT_MBYTE