mirror of
https://github.com/vim/vim.git
synced 2025-07-24 10:24:36 -04:00
patch 8.2.1214: MS-Windows: default _vimrc not correct in silent install mode
Problem: MS-Windows: default _vimrc not correct in silent install mode. Solution: Add the LoadDefaultVimrc macro. (Ken Takata, closes #6451)
This commit is contained in:
parent
297bec0731
commit
ceb56ddbaf
@ -687,6 +687,15 @@ SectionEnd
|
|||||||
${EndIf}
|
${EndIf}
|
||||||
!macroend
|
!macroend
|
||||||
|
|
||||||
|
!macro LoadDefaultVimrc out_var reg_value default_value
|
||||||
|
ClearErrors
|
||||||
|
ReadRegStr ${out_var} HKLM "${UNINST_REG_KEY_VIM}" ${reg_value}
|
||||||
|
${If} ${Errors}
|
||||||
|
${OrIf} ${out_var} == ""
|
||||||
|
StrCpy ${out_var} ${default_value}
|
||||||
|
${EndIf}
|
||||||
|
!macroend
|
||||||
|
|
||||||
Function .onInit
|
Function .onInit
|
||||||
!ifdef HAVE_MULTI_LANG
|
!ifdef HAVE_MULTI_LANG
|
||||||
# Select a language (or read from the registry).
|
# Select a language (or read from the registry).
|
||||||
@ -718,10 +727,10 @@ Function .onInit
|
|||||||
!endif
|
!endif
|
||||||
${EndIf}
|
${EndIf}
|
||||||
|
|
||||||
# Load the selections from the registry (if any).
|
|
||||||
${If} ${RunningX64}
|
${If} ${RunningX64}
|
||||||
SetRegView 64
|
SetRegView 64
|
||||||
${EndIf}
|
${EndIf}
|
||||||
|
# Load the selections from the registry (if any).
|
||||||
!insertmacro LoadSectionSelection ${id_section_console} "select_console"
|
!insertmacro LoadSectionSelection ${id_section_console} "select_console"
|
||||||
!insertmacro LoadSectionSelection ${id_section_batch} "select_batch"
|
!insertmacro LoadSectionSelection ${id_section_batch} "select_batch"
|
||||||
!insertmacro LoadSectionSelection ${id_section_desktop} "select_desktop"
|
!insertmacro LoadSectionSelection ${id_section_desktop} "select_desktop"
|
||||||
@ -736,6 +745,10 @@ Function .onInit
|
|||||||
!ifdef HAVE_NLS
|
!ifdef HAVE_NLS
|
||||||
!insertmacro LoadSectionSelection ${id_section_nls} "select_nls"
|
!insertmacro LoadSectionSelection ${id_section_nls} "select_nls"
|
||||||
!endif
|
!endif
|
||||||
|
# Load the default _vimrc settings from the registry (if any).
|
||||||
|
!insertmacro LoadDefaultVimrc $vim_compat_stat "vim_compat" "all"
|
||||||
|
!insertmacro LoadDefaultVimrc $vim_keymap_stat "vim_keyremap" "default"
|
||||||
|
!insertmacro LoadDefaultVimrc $vim_mouse_stat "vim_mouse" "default"
|
||||||
${If} ${RunningX64}
|
${If} ${RunningX64}
|
||||||
SetRegView lastused
|
SetRegView lastused
|
||||||
${EndIf}
|
${EndIf}
|
||||||
@ -799,17 +812,11 @@ Function SetCustom
|
|||||||
${NSD_CB_AddString} $vim_nsd_compat $(str_msg_compat_defaults)
|
${NSD_CB_AddString} $vim_nsd_compat $(str_msg_compat_defaults)
|
||||||
${NSD_CB_AddString} $vim_nsd_compat $(str_msg_compat_all)
|
${NSD_CB_AddString} $vim_nsd_compat $(str_msg_compat_all)
|
||||||
|
|
||||||
# Default selection
|
${If} $vim_compat_stat == "defaults"
|
||||||
${If} $vim_compat_stat == ""
|
|
||||||
ReadRegStr $3 HKLM "${UNINST_REG_KEY_VIM}" "vim_compat"
|
|
||||||
${Else}
|
|
||||||
StrCpy $3 $vim_compat_stat
|
|
||||||
${EndIf}
|
|
||||||
${If} $3 == "defaults"
|
|
||||||
StrCpy $4 2
|
StrCpy $4 2
|
||||||
${ElseIf} $3 == "vim"
|
${ElseIf} $vim_compat_stat == "vim"
|
||||||
StrCpy $4 1
|
StrCpy $4 1
|
||||||
${ElseIf} $3 == "vi"
|
${ElseIf} $vim_compat_stat == "vi"
|
||||||
StrCpy $4 0
|
StrCpy $4 0
|
||||||
${Else} # default
|
${Else} # default
|
||||||
StrCpy $4 3
|
StrCpy $4 3
|
||||||
@ -828,13 +835,7 @@ Function SetCustom
|
|||||||
${NSD_CB_AddString} $vim_nsd_keymap $(str_msg_keymap_default)
|
${NSD_CB_AddString} $vim_nsd_keymap $(str_msg_keymap_default)
|
||||||
${NSD_CB_AddString} $vim_nsd_keymap $(str_msg_keymap_windows)
|
${NSD_CB_AddString} $vim_nsd_keymap $(str_msg_keymap_windows)
|
||||||
|
|
||||||
# Default selection
|
${If} $vim_keymap_stat == "windows"
|
||||||
${If} $vim_keymap_stat == ""
|
|
||||||
ReadRegStr $3 HKLM "${UNINST_REG_KEY_VIM}" "vim_keyremap"
|
|
||||||
${Else}
|
|
||||||
StrCpy $3 $vim_keymap_stat
|
|
||||||
${EndIf}
|
|
||||||
${If} $3 == "windows"
|
|
||||||
StrCpy $4 1
|
StrCpy $4 1
|
||||||
${Else} # default
|
${Else} # default
|
||||||
StrCpy $4 0
|
StrCpy $4 0
|
||||||
@ -854,15 +855,9 @@ Function SetCustom
|
|||||||
${NSD_CB_AddString} $vim_nsd_mouse $(str_msg_mouse_windows)
|
${NSD_CB_AddString} $vim_nsd_mouse $(str_msg_mouse_windows)
|
||||||
${NSD_CB_AddString} $vim_nsd_mouse $(str_msg_mouse_unix)
|
${NSD_CB_AddString} $vim_nsd_mouse $(str_msg_mouse_unix)
|
||||||
|
|
||||||
# Default selection
|
${If} $vim_mouse_stat == "xterm"
|
||||||
${If} $vim_mouse_stat == ""
|
|
||||||
ReadRegStr $3 HKLM "${UNINST_REG_KEY_VIM}" "vim_mouse"
|
|
||||||
${Else}
|
|
||||||
StrCpy $3 $vim_mouse_stat
|
|
||||||
${EndIf}
|
|
||||||
${If} $3 == "xterm"
|
|
||||||
StrCpy $4 2
|
StrCpy $4 2
|
||||||
${ElseIf} $3 == "windows"
|
${ElseIf} $vim_mouse_stat == "windows"
|
||||||
StrCpy $4 1
|
StrCpy $4 1
|
||||||
${Else} # default
|
${Else} # default
|
||||||
StrCpy $4 0
|
StrCpy $4 0
|
||||||
|
@ -754,6 +754,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 */
|
||||||
|
/**/
|
||||||
|
1214,
|
||||||
/**/
|
/**/
|
||||||
1213,
|
1213,
|
||||||
/**/
|
/**/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user