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

15797Re: Few questions on new features:

Expand Messages
  • Bram Moolenaar
    Oct 20, 2000
    • 0 Attachment
      Matt Armstrong wrote:

      > The problem is more general -- any error in .vimrc doesn't result in a
      > (detectable) hit-return prompt.
      >
      > The problem seems to occur only when using a gnome-terminal. It works
      > fine with rxvt or xterm.
      >
      > ui.c's fill_input_buf() is seeing this from stdin, right when I start
      > vim, before I type anything:
      >
      > ui.c:1376 fill_input_buf: len 10
      > ui.c:1383 fill_input_buf: inbuf[0] = '^[' (0x1b)
      > ui.c:1383 fill_input_buf: inbuf[1] = '[' (0x5b)
      > ui.c:1383 fill_input_buf: inbuf[2] = '>' (0x3e)
      > ui.c:1383 fill_input_buf: inbuf[3] = '1' (0x31)
      > ui.c:1383 fill_input_buf: inbuf[4] = ';' (0x3b)
      > ui.c:1383 fill_input_buf: inbuf[5] = '0' (0x30)
      > ui.c:1383 fill_input_buf: inbuf[6] = ';' (0x3b)
      > ui.c:1383 fill_input_buf: inbuf[7] = '0' (0x30)
      > ui.c:1383 fill_input_buf: inbuf[8] = 'c' (0x63)
      > ui.c:1383 fill_input_buf: inbuf[9] = '^@' (0x0)
      >
      > Vim interprets this as "hitting return." I don't know where to find out
      > what those escape sequences actually mean.
      >
      > Is this a bug in vim or gnome-terminal?

      Aha, that explains a lot. This is the response to the request-version string
      (t_RV). It shouldn't cause any effect. Try this patch:

      *** message.c~ Tue Oct 3 17:07:58 2000
      --- message.c Fri Oct 20 10:19:46 2000
      ***************
      *** 671,677 ****
      c = safe_vgetc();
      if (!global_busy)
      got_int = FALSE;
      ! } while (c == Ctrl_C
      #ifdef FEAT_GUI
      || c == K_VER_SCROLLBAR || c == K_HOR_SCROLLBAR
      #endif
      --- 671,677 ----
      c = safe_vgetc();
      if (!global_busy)
      got_int = FALSE;
      ! } while (c == Ctrl_C || c == K_IGNORE
      #ifdef FEAT_GUI
      || c == K_VER_SCROLLBAR || c == K_HOR_SCROLLBAR
      #endif

      --
      [clop clop]
      ARTHUR: Old woman!
      DENNIS: Man!
      ARTHUR: Man, sorry. What knight lives in that castle over there?
      DENNIS: I'm thirty seven.
      ARTHUR: What?
      DENNIS: I'm thirty seven -- I'm not old!
      The Quest for the Holy Grail (Monty Python)

      /// Bram Moolenaar Bram@... http://www.moolenaar.net \\\
      \\\ Vim: http://www.vim.org ICCF Holland: http://iccf-holland.org ///
    • Show all 7 messages in this topic