Loading ...
Sorry, an error occurred while loading the content.

Re: Nit with q: in vim 6.0t [patch included]

Expand Messages
  • Bram Moolenaar
    ... Summary: the command is not executed if there was an error message. I had to use the debugger to find out why this happens. It appears the did_emsg flag
    Message 1 of 2 , Jan 30, 2001
    • 0 Attachment
      Preben Guldberg wrote:

      > Getting used to q: (which is rather nice), I came across the following
      > session (<CR> denoting a real enter, not typed like <Nop> is):
      >
      > $ vim -u NONE -c 'se nocp all&'
      > q:ninmap K <Nop><CR>:nmap<CR>

      Summary: the command is not executed if there was an error message.

      I had to use the debugger to find out why this happens. It appears the
      did_emsg flag wasn't reset, thus when executing the command it was still set
      and the command would be aborted.

      Try this patch:

      *** main.c~ Sun Jan 28 20:57:28 2001
      --- main.c Tue Jan 30 10:32:54 2001
      ***************
      *** 1687,1692 ****
      --- 1687,1693 ----
      }

      emsg_on_display = FALSE; /* can delete error message now */
      + did_emsg = FALSE;
      msg_didany = FALSE; /* reset lines_left in msg_start() */
      do_redraw = FALSE;
      showruler(FALSE);

      --
      hundred-and-one symptoms of being an internet addict:
      77. The phone company asks you to test drive their new PBX system

      /// Bram Moolenaar -- Bram@... -- http://www.moolenaar.net \\\
      ((( Creator of Vim - http://www.vim.org -- ftp://ftp.vim.org/pub/vim )))
      \\\ Help me helping AIDS orphans in Uganda - http://iccf-holland.org ///
    Your message has been successfully submitted and would be delivered to recipients shortly.