Skip to content

Commit

Permalink
Merge pull request #104: Make GUI dialogs easier to read
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
xolox committed Mar 15, 2015
2 parents 35b6742 + 80d7822 commit c7ea852
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -271,7 +271,7 @@ Recently this plug-in switched from reimplementing [:mksession][mksession] to ac
<!-- Start of generated documentation -->

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

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

Expand Down
12 changes: 6 additions & 6 deletions autoload/xolox/session.vim
Expand Up @@ -4,7 +4,7 @@
" Last Change: March 15, 2015
" URL: http://peterodding.com/code/vim/session/

let g:xolox#session#version = '2.9.2'
let g:xolox#session#version = '2.10'

" Public API for session persistence. {{{1

Expand Down Expand Up @@ -406,9 +406,9 @@ function! xolox#session#auto_load() " {{{2
\ is_default_session ? 'default' : 'last used',
\ is_default_session ? '' : printf(' (%s)', session))
" Prepare the list of choices.
let choices = ['&Yes', '&No']
let choices = ["&Restore", "&Don't Restore"]
if g:session_default_to_last && has_last_session
call add(choices, '&Forget')
call add(choices, "&Forget")
endif
" Prompt the user (if not configured otherwise).
let choice = s:prompt(msg, choices, 'g:session_autoload')
Expand Down Expand Up @@ -462,7 +462,7 @@ function! xolox#session#auto_save() " {{{2
if !empty(name)
let is_tab_scoped = xolox#session#is_tab_scoped()
let msg = "Do you want to save your %s before quitting Vim?"
if s:prompt(printf(msg, xolox#session#get_label(name, is_tab_scoped)), ['&Yes', '&No'], 'g:session_autosave') == 1
if s:prompt(printf(msg, xolox#session#get_label(name, is_tab_scoped)), ["&Save", "&Don't Save"], 'g:session_autosave') == 1
if g:session_default_overwrite && (name == g:session_default_name)
let bang = '!'
else
Expand Down Expand Up @@ -536,7 +536,7 @@ function! s:prompt(msg, choices, option_name)
return 0
else
if g:session_verbose_messages
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'"
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'"
let prompt = printf(format, a:msg, xolox#misc#os#is_win() ? '~\_vimrc' : '~/.vimrc', a:option_name)
else
let prompt = a:msg
Expand Down Expand Up @@ -673,7 +673,7 @@ function! xolox#session#close_cmd(bang, silent, save_allowed, command) abort " {
if a:save_allowed
let msg = "Do you want to save your current %s before closing it?"
let label = xolox#session#get_label(name, !is_all_tabs)
if s:prompt(printf(msg, label), ['&Yes', '&No'], 'g:session_autosave') == 1
if s:prompt(printf(msg, label), ["&Save", "&Don't Save"], 'g:session_autosave') == 1
call xolox#session#save_cmd(name, a:bang, a:command)
endif
else
Expand Down
2 changes: 1 addition & 1 deletion doc/session.txt
Expand Up @@ -544,7 +544,7 @@ might take a while...)
Function reference ~

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

-------------------------------------------------------------------------------
*public-api-for-vim-session-plug-in*
Expand Down

0 comments on commit c7ea852

Please sign in to comment.