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

68669Re: Issue 121 in vim: cursor jumps to the end of closed fold when executing a register

Expand Messages
  • glts
    Mar 12, 2013
    • 0 Attachment
      Hi Christian,

      On Tuesday, March 12, 2013 9:16:04 PM UTC+1, Christian Brabandt wrote:
      > Ah, I see, this only happens when sourcing as a script. The problem here
      > is, that there is a subtle difference between the :@ command and the
      > :normal! @ command. When using the :@ command, the register will be
      > called for the range of the folded lines and therefore implicitly sets
      > the range to the first and lastline of the fold and then the ex_at()
      > function explicitly sets the cursorline to the endline of the register.

      yes, I saw the problem.

      > We could change it, but the documentation explicitly states, that in the
      > future the register will be executed for the range given, so we should
      > rather just implement this ;)

      Unfortunately, the expression "in the future" is very relative generally
      speaking and with Vim in particular.

      For the present, the documentation only requires that the cursor will be
      set to [addr]: "set cursor at line [addr] (default is current line)".
      So, as far as I understand, this issue is easily fixed by removing the
      WHOLEFOLD flag from CMD_at and CMD_star, at least until somebody
      actually implements the promised functionality. See the attached patch.

      --
      --
      You received this message from the "vim_dev" maillist.
      Do not top-post! Type your reply below the text you are replying to.
      For more information, visit http://www.vim.org/maillist.php

      ---
      You received this message because you are subscribed to the Google Groups "vim_dev" group.
      To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe@....
      For more options, visit https://groups.google.com/groups/opt_out.
    • Show all 7 messages in this topic