mirror of
				https://github.com/vim/vim.git
				synced 2025-10-30 09:47:20 -04:00 
			
		
		
		
	patch 9.0.0960: error when using the "Spelling / Find More Languages" menu
Problem:    Error when using the "Tools / Spelling / Find More Languages"
            menu.
Solution:   Remove "<SID>".  Reset "g:menutrans_set_lang_to" when 'encoding'
            changes. (closes #11625)
			
			
This commit is contained in:
		| @@ -474,7 +474,7 @@ if has("spell") | |||||||
|   an <silent> 40.335.270 &Tools.&Spelling.&Find\ More\ Languages	:call <SID>SpellLang()<CR> |   an <silent> 40.335.270 &Tools.&Spelling.&Find\ More\ Languages	:call <SID>SpellLang()<CR> | ||||||
|  |  | ||||||
|   let s:undo_spelllang = ['aun &Tools.&Spelling.&Find\ More\ Languages'] |   let s:undo_spelllang = ['aun &Tools.&Spelling.&Find\ More\ Languages'] | ||||||
|   def s:SpellLang() |   def s:SpellLang(encChanged = false) | ||||||
|     for cmd in s:undo_spelllang |     for cmd in s:undo_spelllang | ||||||
|       exe "silent! " .. cmd |       exe "silent! " .. cmd | ||||||
|     endfor |     endfor | ||||||
| @@ -482,7 +482,8 @@ if has("spell") | |||||||
|  |  | ||||||
|     var enc = &enc == "iso-8859-15" ? "latin1" : &enc |     var enc = &enc == "iso-8859-15" ? "latin1" : &enc | ||||||
|  |  | ||||||
|     if !exists("g:menutrans_set_lang_to") |     # Reset g:menutrans_set_lang_to when called for the EncodingChanged event. | ||||||
|  |     if !exists("g:menutrans_set_lang_to") || encChanged | ||||||
|       g:menutrans_set_lang_to = 'Set Language to' |       g:menutrans_set_lang_to = 'Set Language to' | ||||||
|     endif |     endif | ||||||
|  |  | ||||||
| @@ -510,12 +511,12 @@ if has("spell") | |||||||
|     else |     else | ||||||
|       echomsg "Found " .. found .. " more spell files" |       echomsg "Found " .. found .. " more spell files" | ||||||
|     endif |     endif | ||||||
|  |  | ||||||
|     # Need to redo this when 'encoding' is changed. |     # Need to redo this when 'encoding' is changed. | ||||||
|     augroup spellmenu |     augroup spellmenu | ||||||
|     au! EncodingChanged * call <SID>SpellLang() |     au! EncodingChanged * call SpellLang(true) | ||||||
|     augroup END |     augroup END | ||||||
|   enddef |   enddef | ||||||
|  |  | ||||||
| endif | endif | ||||||
|  |  | ||||||
| " Tools.Fold Menu | " Tools.Fold Menu | ||||||
|   | |||||||
| @@ -695,6 +695,8 @@ static char *(features[]) = | |||||||
|  |  | ||||||
| static int included_patches[] = | static int included_patches[] = | ||||||
| {   /* Add new patch number below this line */ | {   /* Add new patch number below this line */ | ||||||
|  | /**/ | ||||||
|  |     960, | ||||||
| /**/ | /**/ | ||||||
|     959, |     959, | ||||||
| /**/ | /**/ | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user