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

[PATCH] when setting cursor pos using python, take 've' option into account

Expand Messages
  • lilydjwg
    I notice that using python to set cursor position, the behaviour is the same as virtualedit is set to onemore ---if the column pos is too large, it will be
    Message 1 of 2 , Jul 5, 2011
      I notice that using python to set cursor position, the behaviour is the
      same as 'virtualedit' is set to 'onemore'---if the column pos is too
      large, it will be put after the end of line. The patch will check 've'
      option and decide where to put the cursor if the column pos is too
      large.

      --
      Best regards,
      lilydjwg

      Linux Vim Python 我的博客
      http://lilydjwg.is-programmer.com/

      --
      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
    • Bram Moolenaar
      ... The check_cursor_col() does this, but only for curwin. Let me make it work for any window, then we avoid duplicating this logic. -- Did you hear about the
      Message 2 of 2 , Jul 7, 2011
        lilydjwg wrote:

        > I notice that using python to set cursor position, the behaviour is the
        > same as 'virtualedit' is set to 'onemore'---if the column pos is too
        > large, it will be put after the end of line. The patch will check 've'
        > option and decide where to put the cursor if the column pos is too
        > large.

        The check_cursor_col() does this, but only for curwin. Let me make it
        work for any window, then we avoid duplicating this logic.

        --
        Did you hear about the new 3 million dollar West Virginia State Lottery?
        The winner gets 3 dollars a year for a million years.

        /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
        /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
        \\\ an exciting new programming language -- http://www.Zimbu.org ///
        \\\ help me help AIDS victims -- http://ICCF-Holland.org ///

        --
        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
      Your message has been successfully submitted and would be delivered to recipients shortly.