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

Re: Odd input() behaviour

Expand Messages
  • Andy Wokula
    ... For example ... or higher. ... -- Andy --~--~---------~--~----~------------~-------~--~----~ You received this message from the vim_dev maillist. For
    Message 1 of 3 , Mar 29 6:58 AM
    • 0 Attachment
      Anton W├Âllert schrieb:
      > G'Day,
      >
      > both snippets result in different behaviour, if you put *just* these in
      > your vimrc and press f2/f3 in insert mode:
      >
      >
      > 1:
      > inoremap <silent> <F2> <C-r>=TestFuncA()<CR>
      >
      > function! TestFuncA()
      > let foobar = input("tes\nt")
      > return "X\<c-\>\<c-n>:echo \"Foobar\"\<cr>\"_s"
      > endfunction
      >
      > 2:
      > inoremap <silent> <F3> <C-r>=TestFuncB()<CR>
      >
      > function! TestFuncB()
      > let foobar = input("test")
      > return "X\<c-\>\<c-n>:echo \"Foobar\"\<cr>\"_s"
      > endfunction
      >
      > only difference is the linebreak in the input command. The 1. will leave
      > a " in the text. Some settings in .vimrc seem to prevent this behaviour,

      For example

      :set ch=2

      or higher.

      > so you should try it without any settings.
      > I came to this problem because of strange behaviour of vim-latexsuite.
      > This bug exists with 7.0 and 7.1.
      > I guess the problem lies in the implementation of f_input in eval.c
      > because it does some msg_* stuff when a newline is there in the input
      > text and this seems to change the state somehow, but I'm not sure :(.
      >
      > Maybe you can help me. Thanks a lot.
      >
      > Anton

      --
      Andy


      --~--~---------~--~----~------------~-------~--~----~
      You received this message from the "vim_dev" maillist.
      For more information, visit http://www.vim.org/maillist.php
      -~----------~----~----~----~------~----~------~--~---
    Your message has been successfully submitted and would be delivered to recipients shortly.