To: Wichert Akkerman <[email protected]>
Cc: [email protected]
Subject: patch 5.4n.18 (was: klein foutje in vim)
In-Reply-To: <[email protected]>
Fcc: outbox
From: Bram Moolenaar <[email protected]>
------------

Wichert Akkerman wrote:

> Als ik met Q naar ex-mode ga krijg ik de volgende mededeling:
>
>    Entering Ex mode.  Type...al" to go to Normal mode.
>
> Dat lijkt op een typefoutje ergens.

No, that's not a typo, it's the message-shortener at work.  That should not
happen here, since we can't get the hit-return prompt here.  Hmm, I suppose we
should never shorten messages when in Ex mode?


Patch 5.4n.18
Problem:    When going to Ex mode with "Q", the "Entering Ex mode" message was
           shortened.  (Wichert Akkerman)
Solution:   Don't truncate messages when in Ex mode, we don't get the
           hit-return prompt anyway.
Files:      src/message.c


*** ../vim-5.4n/src/message.c   Sun Jul  4 20:36:01 1999
--- src/message.c       Wed Jul  7 21:22:04 1999
***************
*** 117,123 ****
       add_msg_hist(s, -1, attr);

     /* May truncate message to avoid a hit-return prompt */
!     if (!msg_scroll && !need_wait_return && shortmess(SHM_TRUNCALL))
     {
       len = vim_strsize(s);
       room = (int)(Rows - cmdline_row - 1) * Columns + sc_col - 1;
--- 117,124 ----
       add_msg_hist(s, -1, attr);

     /* May truncate message to avoid a hit-return prompt */
!     if (!msg_scroll && !need_wait_return && shortmess(SHM_TRUNCALL)
!                                                           && !exmode_active)
     {
       len = vim_strsize(s);
       room = (int)(Rows - cmdline_row - 1) * Columns + sc_col - 1;
***************
*** 418,424 ****
 {
     int               n;

!     if ((force || shortmess(SHM_TRUNC)) && (n = (int)STRLEN(s) -
                   (int)(Rows - cmdline_row - 1) * Columns - sc_col + 1) > 0)
     {
       s += n;
--- 419,426 ----
 {
     int               n;

!     if ((force || (shortmess(SHM_TRUNC) && !exmode_active))
!           && (n = (int)STRLEN(s) -
                   (int)(Rows - cmdline_row - 1) * Columns - sc_col + 1) > 0)
     {
       s += n;

--
(letter from Mark to Mike, about the film's probale certificate)
     For an 'A' we would have to: Lose as may shits as possible Take Jesus
     Christ out, if possible Loose "I fart in your general direction" Lose
     "the oral sex" Lose "oh, fuck off" Lose "We make castanets out of your
     testicles"
                "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

--/-/---- Bram Moolenaar ---- [email protected] ---- [email protected] ---\-\--
 \ \    www.vim.org/iccf      www.moolenaar.net       www.vim.org    / /