Ron Aaron wrote:
> I would like to differentiate between someone pressing "ESC" to quit
> an input(), and them pressing "RETURN" to accept the default.
>
> Problem is in the case I have:
>
> let answer = input("Enter comment: ")
>
> "answer" is simply empty in both the ESC and the ENTER cases; how can
> I distinguish them?
> >
>
Not bulletproof :
let answer = input("Enter comment:"," ")
if empty(answer) "<esc> or <bs><cr>
...
else
let answer = answer[1]
....
endif
-ap
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---