Skip to content

Commit c7ea852

Browse files
committed
Merge pull request #104: Make GUI dialogs easier to read
Note there is one change in the merge commit which isn't in the original pull request: I've removed the Unicode smart quotes, because I've learned that unconditional Unicode character usage in my Vim plug-ins is a big no-no waiting for unhappy users to report they see strange characters in the Vim plug-in's output :-). Apart from that I fully agree with the changes implemented by @roryokane.
2 parents 35b6742 + 80d7822 commit c7ea852

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ Recently this plug-in switched from reimplementing [:mksession][mksession] to ac
271271
<!-- Start of generated documentation -->
272272

273273
The documentation of the 39 functions below was extracted from
274-
2 Vim scripts on March 15, 2015 at 10:22.
274+
2 Vim scripts on March 15, 2015 at 13:37.
275275

276276
### Public API for the vim-session plug-in
277277

autoload/xolox/session.vim

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
" Last Change: March 15, 2015
55
" URL: http://peterodding.com/code/vim/session/
66

7-
let g:xolox#session#version = '2.9.2'
7+
let g:xolox#session#version = '2.10'
88

99
" Public API for session persistence. {{{1
1010

@@ -406,9 +406,9 @@ function! xolox#session#auto_load() " {{{2
406406
\ is_default_session ? 'default' : 'last used',
407407
\ is_default_session ? '' : printf(' (%s)', session))
408408
" Prepare the list of choices.
409-
let choices = ['&Yes', '&No']
409+
let choices = ["&Restore", "&Don't Restore"]
410410
if g:session_default_to_last && has_last_session
411-
call add(choices, '&Forget')
411+
call add(choices, "&Forget")
412412
endif
413413
" Prompt the user (if not configured otherwise).
414414
let choice = s:prompt(msg, choices, 'g:session_autoload')
@@ -462,7 +462,7 @@ function! xolox#session#auto_save() " {{{2
462462
if !empty(name)
463463
let is_tab_scoped = xolox#session#is_tab_scoped()
464464
let msg = "Do you want to save your %s before quitting Vim?"
465-
if s:prompt(printf(msg, xolox#session#get_label(name, is_tab_scoped)), ['&Yes', '&No'], 'g:session_autosave') == 1
465+
if s:prompt(printf(msg, xolox#session#get_label(name, is_tab_scoped)), ["&Save", "&Don't Save"], 'g:session_autosave') == 1
466466
if g:session_default_overwrite && (name == g:session_default_name)
467467
let bang = '!'
468468
else
@@ -536,7 +536,7 @@ function! s:prompt(msg, choices, option_name)
536536
return 0
537537
else
538538
if g:session_verbose_messages
539-
let format = "%s Note that you can permanently disable this dialog by adding the following line to your %s script:\n\n\t:let %s = 'no'"
539+
let format = "%s\n\nNote that you can permanently disable this dialog by adding the following line to your %s script:\n\n\t:let %s = 'no'"
540540
let prompt = printf(format, a:msg, xolox#misc#os#is_win() ? '~\_vimrc' : '~/.vimrc', a:option_name)
541541
else
542542
let prompt = a:msg
@@ -673,7 +673,7 @@ function! xolox#session#close_cmd(bang, silent, save_allowed, command) abort " {
673673
if a:save_allowed
674674
let msg = "Do you want to save your current %s before closing it?"
675675
let label = xolox#session#get_label(name, !is_all_tabs)
676-
if s:prompt(printf(msg, label), ['&Yes', '&No'], 'g:session_autosave') == 1
676+
if s:prompt(printf(msg, label), ["&Save", "&Don't Save"], 'g:session_autosave') == 1
677677
call xolox#session#save_cmd(name, a:bang, a:command)
678678
endif
679679
else

doc/session.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -544,7 +544,7 @@ might take a while...)
544544
Function reference ~
545545

546546
The documentation of the 39 functions below was extracted from 2 Vim scripts on
547-
March 15, 2015 at 10:22.
547+
March 15, 2015 at 13:37.
548548

549549
-------------------------------------------------------------------------------
550550
*public-api-for-vim-session-plug-in*

0 commit comments

Comments
 (0)