Sung Pae wrote:

> The documentation explicitly states that moving the cursor is okay in
> an indentexpr, but this is only true when moved directly with cursor(),
> setpos(), search(), etc. Moving the cursor via `normal! w` has side
> effects that frustrate the attempts of get_expr_indent() to restore the
> original cursor position. However, this is not apparent without reading
> the source.
> 
> For example:
> 
>         function! BadIndentExpr()
>                 normal! $
>                 return 8
>         endfunction
>         setlocal indentexpr=BadIndentExpr()
> 
> The cursor position is not restored when indenting the current line.

I rather fix the problem than updating the documentation.
You say you read the source code, can you pinpoint why the cursor is not
restored when using :normal?


-- 
Men may not be seen publicly in any kind of strapless gown.
                [real standing law in Florida, United States of America]

 /// Bram Moolenaar -- [email protected] -- 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

--- 
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 [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Raspunde prin e-mail lui