Update runtime files
diff --git a/runtime/doc/popup.txt b/runtime/doc/popup.txt
index 51413e7..dd478ae 100644
--- a/runtime/doc/popup.txt
+++ b/runtime/doc/popup.txt
@@ -1,4 +1,4 @@
-*popup.txt* For Vim version 8.2. Last change: 2022 Apr 04
+*popup.txt* For Vim version 8.2. Last change: 2022 May 29
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -147,7 +147,8 @@
different: *E863*
- The popup window always has focus, it is not possible to switch to another
window.
-- When the job ends, the popup window closes.
+- When the job ends, the popup window shows the buffer in Terminal-Normal
+ mode. Use `:q` to close it or use "term_finish" value "close".
- The popup window can be closed with `popup_close()`, the terminal buffer
then becomes hidden.
- It is not possible to open a second popup window with a terminal. *E861*
@@ -998,20 +999,23 @@
==============================================================================
4. Examples *popup-examples*
+These examplese use |Vim9| script.
+
TODO: more interesting examples
+
*popup_dialog-example*
Prompt the user to press y/Y or n/N: >
- func MyDialogHandler(id, result)
- if a:result
- " ... 'y' or 'Y' was pressed
- endif
- endfunc
-
- call popup_dialog('Continue? y/n', #{
- \ filter: 'popup_filter_yesno',
- \ callback: 'MyDialogHandler',
- \ })
+ popup_dialog('Continue? y/n', {
+ filter: 'popup_filter_yesno',
+ callback: (id, result) => {
+ if result == 1
+ echomsg "'y' or 'Y' was pressed"
+ else
+ echomsg "'y' or 'Y' was NOT pressed"
+ endif
+ },
+ })
<
*popup_menu-shortcut-example*
Extend popup_filter_menu() with shortcut keys: >