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

Re: indentexpr - nasyy side-effects?

Expand Messages
  • Bram Moolenaar
    ... Thanks for the clear example. I now see what goes wrong: The redone text is put in the stuff buffer, which the :normal command reads before getting to
    Message 1 of 8 , Nov 2, 2001
    • 0 Attachment
      Neil Bird wrote:

      > I really don't understand this. I've whittled it down, and
      > it /does/ appear to be the 1st. normal!. It *still* causes an
      > error even if I only do 'normal! $', with no line jumping!
      >
      > Hang on ...
      >
      > Right, here's a rock-bottom cut-down case; looks like
      > indentexpr (sandbox?) can't cope with 'normal $' [maybe as it's
      > called from 'insert' mode?].
      >
      >
      >
      > Load the attached file:
      >
      > vim -u NONE -U NONE indent-test
      > :so %
      >
      >
      > Then @a and finally . (to repeat the insertion).

      Thanks for the clear example. I now see what goes wrong: The redone
      text is put in the stuff buffer, which the ":normal" command reads
      before getting to the "$".

      This requires saving and restoring the stuff buffer inside the ":normal"
      command. I'll make a patch for it.

      --
      It is too bad that the speed of light hasn't kept pace with the
      changes in CPU speed and network bandwidth. -- <wietse@...>

      /// Bram Moolenaar -- Bram@... -- http://www.moolenaar.net \\\
      ((( Creator of Vim -- http://vim.sf.net -- 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.