Jason Franklin wrote:
> Note that this bug report and patch is not my work. This solution was
> provided to me by a colleague named "Brandon Pfeifer" to submit to this
> list. Please credit him in the commit message and changelog if this
> patch is accepted.
>
> To reproduce...
>
> - latest vim build as of this writing (v8.2.1145)
> - gnome-terminal (Ubuntu 18.04) or konsole (Debian 10)
>
> 1. VIMRUNTIME=../runtime ./vim --clean
> 2. :set hidden<CR>
> 3. itest<ESC>
> 4. :e buffer.c<CR> (or some other file...)
> 5. :confirm wq<CR>
> 6. Now type "ccccc......"
>
> Brandon discovered that the reason for this is that the do_dialog()
> function is not always executed when the terminal is in raw mode, like
> one would expect. Sometimes, this function is executed in cooked mode,
> which results in this undesirable behavior.
>
> Specifically, the problem is observable in the debugger at the select()
> call in the RealWaitForChar() function in os_unix.c. Cooked mode causes
> this function to wait for a line feed character.
>
> Two patches are attached to fix this bug.
>
> 1. test.diff - formal demonstration of bug with a test
> 2. fix.diff - causes do_dialog() to set correct mode (saves/restores)
>
> Email me with any questions.
Thanks. I'm not sure why Vim is in cooked mode here. Anyway, the test
shows that it happens.
Let me use the opportunity to cleanup those tests a bit.
--
"You're fired." (1980)
"You're laid off." (1985)
"You're downsized." (1990)
"You're rightsized." (1992)
(Scott Adams - The Dilbert principle)
/// 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].
To view this discussion on the web visit
https://groups.google.com/d/msgid/vim_dev/202007061923.066JNMLQ896023%40masaka.moolenaar.net.