mirror of
https://github.com/jesseduffield/lazygit.git
synced 2026-10-04 21:16:48 -04:00
Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e81cfdba33 |
@@ -73,6 +73,8 @@ gui:
|
|||||||
# If true, capture mouse events.
|
# If true, capture mouse events.
|
||||||
# When mouse events are captured, it's a little harder to select text: e.g.
|
# When mouse events are captured, it's a little harder to select text: e.g.
|
||||||
# requiring you to hold the option key when on macOS.
|
# requiring you to hold the option key when on macOS.
|
||||||
|
# Mouse capture can also be toggled at runtime with the 'toggleMouseCapture'
|
||||||
|
# keybinding ('%' by default).
|
||||||
mouseEvents: true
|
mouseEvents: true
|
||||||
|
|
||||||
# If true, do not show a warning when amending a commit.
|
# If true, do not show a warning when amending a commit.
|
||||||
@@ -725,6 +727,7 @@ keybinding:
|
|||||||
submitEditorText: <enter>
|
submitEditorText: <enter>
|
||||||
extrasMenu: '@'
|
extrasMenu: '@'
|
||||||
toggleWhitespaceInDiffView: <ctrl+w>
|
toggleWhitespaceInDiffView: <ctrl+w>
|
||||||
|
toggleMouseCapture: '%'
|
||||||
increaseContextInDiffView: '}'
|
increaseContextInDiffView: '}'
|
||||||
decreaseContextInDiffView: '{'
|
decreaseContextInDiffView: '{'
|
||||||
increaseRenameSimilarityThreshold: )
|
increaseRenameSimilarityThreshold: )
|
||||||
|
|||||||
@@ -31,6 +31,7 @@ _This file is auto-generated. To update, make the changes in the pkg/i18n direct
|
|||||||
| `` q, <ctrl+c> `` | Quit | |
|
| `` q, <ctrl+c> `` | Quit | |
|
||||||
| `` <ctrl+z> `` | Suspend the application | |
|
| `` <ctrl+z> `` | Suspend the application | |
|
||||||
| `` <ctrl+w> `` | Toggle whitespace | Toggle whether or not whitespace changes are shown in the diff view.<br><br>The default can be changed in the config file with the key 'git.ignoreWhitespaceInDiffView'. |
|
| `` <ctrl+w> `` | Toggle whitespace | Toggle whether or not whitespace changes are shown in the diff view.<br><br>The default can be changed in the config file with the key 'git.ignoreWhitespaceInDiffView'. |
|
||||||
|
| `` % `` | Toggle mouse capture | Toggle whether lazygit captures mouse events. When mouse capture is off, the terminal handles the mouse, so you can select text with it; this is useful in terminals that don't have a modifier key to bypass the capture.<br><br>The default can be changed in the config file with the key 'gui.mouseEvents'. |
|
||||||
| `` <alt+shift+c> `` | Edit config file | Open file in external editor. |
|
| `` <alt+shift+c> `` | Edit config file | Open file in external editor. |
|
||||||
| `` z `` | Undo | The reflog will be used to determine what git command to run to undo the last git command. This does not include changes to the working tree; only commits are taken into consideration. |
|
| `` z `` | Undo | The reflog will be used to determine what git command to run to undo the last git command. This does not include changes to the working tree; only commits are taken into consideration. |
|
||||||
| `` Z `` | Redo | The reflog will be used to determine what git command to run to redo the last git command. This does not include changes to the working tree; only commits are taken into consideration. |
|
| `` Z `` | Redo | The reflog will be used to determine what git command to run to redo the last git command. This does not include changes to the working tree; only commits are taken into consideration. |
|
||||||
|
|||||||
@@ -31,6 +31,7 @@ _This file is auto-generated. To update, make the changes in the pkg/i18n direct
|
|||||||
| `` q, <ctrl+c> `` | 終了 | |
|
| `` q, <ctrl+c> `` | 終了 | |
|
||||||
| `` <ctrl+z> `` | Suspend the application | |
|
| `` <ctrl+z> `` | Suspend the application | |
|
||||||
| `` <ctrl+w> `` | 空白表示の切り替え | Toggle whether or not whitespace changes are shown in the diff view.<br><br>The default can be changed in the config file with the key 'git.ignoreWhitespaceInDiffView'. |
|
| `` <ctrl+w> `` | 空白表示の切り替え | Toggle whether or not whitespace changes are shown in the diff view.<br><br>The default can be changed in the config file with the key 'git.ignoreWhitespaceInDiffView'. |
|
||||||
|
| `` % `` | Toggle mouse capture | Toggle whether lazygit captures mouse events. When mouse capture is off, the terminal handles the mouse, so you can select text with it; this is useful in terminals that don't have a modifier key to bypass the capture.<br><br>The default can be changed in the config file with the key 'gui.mouseEvents'. |
|
||||||
| `` <alt+shift+c> `` | 設定ファイルを編集 | 外部エディタでファイルを開きます。 |
|
| `` <alt+shift+c> `` | 設定ファイルを編集 | 外部エディタでファイルを開きます。 |
|
||||||
| `` z `` | 元に戻す | 最後のgitコマンドを元に戻すために実行するgitコマンドを決定するためにreflogが使用されます。これにはワーキングツリーへの変更は含まれません。コミットのみが考慮されます。 |
|
| `` z `` | 元に戻す | 最後のgitコマンドを元に戻すために実行するgitコマンドを決定するためにreflogが使用されます。これにはワーキングツリーへの変更は含まれません。コミットのみが考慮されます。 |
|
||||||
| `` Z `` | やり直す | 最後のgitコマンドをやり直すために実行するgitコマンドを決定するためにreflogが使用されます。これにはワーキングツリーへの変更は含まれません。コミットのみが考慮されます。 |
|
| `` Z `` | やり直す | 最後のgitコマンドをやり直すために実行するgitコマンドを決定するためにreflogが使用されます。これにはワーキングツリーへの変更は含まれません。コミットのみが考慮されます。 |
|
||||||
|
|||||||
@@ -31,6 +31,7 @@ _This file is auto-generated. To update, make the changes in the pkg/i18n direct
|
|||||||
| `` q, <ctrl+c> `` | 종료 | |
|
| `` q, <ctrl+c> `` | 종료 | |
|
||||||
| `` <ctrl+z> `` | Suspend the application | |
|
| `` <ctrl+z> `` | Suspend the application | |
|
||||||
| `` <ctrl+w> `` | 공백문자를 Diff 뷰에서 표시 여부 전환 | Toggle whether or not whitespace changes are shown in the diff view.<br><br>The default can be changed in the config file with the key 'git.ignoreWhitespaceInDiffView'. |
|
| `` <ctrl+w> `` | 공백문자를 Diff 뷰에서 표시 여부 전환 | Toggle whether or not whitespace changes are shown in the diff view.<br><br>The default can be changed in the config file with the key 'git.ignoreWhitespaceInDiffView'. |
|
||||||
|
| `` % `` | Toggle mouse capture | Toggle whether lazygit captures mouse events. When mouse capture is off, the terminal handles the mouse, so you can select text with it; this is useful in terminals that don't have a modifier key to bypass the capture.<br><br>The default can be changed in the config file with the key 'gui.mouseEvents'. |
|
||||||
| `` <alt+shift+c> `` | 설정 파일 수정 | Open file in external editor. |
|
| `` <alt+shift+c> `` | 설정 파일 수정 | Open file in external editor. |
|
||||||
| `` z `` | 되돌리기 (reflog) (실험적) | The reflog will be used to determine what git command to run to undo the last git command. This does not include changes to the working tree; only commits are taken into consideration. |
|
| `` z `` | 되돌리기 (reflog) (실험적) | The reflog will be used to determine what git command to run to undo the last git command. This does not include changes to the working tree; only commits are taken into consideration. |
|
||||||
| `` Z `` | 다시 실행 (reflog) (실험적) | The reflog will be used to determine what git command to run to redo the last git command. This does not include changes to the working tree; only commits are taken into consideration. |
|
| `` Z `` | 다시 실행 (reflog) (실험적) | The reflog will be used to determine what git command to run to redo the last git command. This does not include changes to the working tree; only commits are taken into consideration. |
|
||||||
|
|||||||
@@ -31,6 +31,7 @@ _This file is auto-generated. To update, make the changes in the pkg/i18n direct
|
|||||||
| `` q, <ctrl+c> `` | Afsluiten | |
|
| `` q, <ctrl+c> `` | Afsluiten | |
|
||||||
| `` <ctrl+z> `` | Pauzeer de applicatie | |
|
| `` <ctrl+z> `` | Pauzeer de applicatie | |
|
||||||
| `` <ctrl+w> `` | Toggle whitespace | Toggle whether or not whitespace changes are shown in the diff view.<br><br>The default can be changed in the config file with the key 'git.ignoreWhitespaceInDiffView'. |
|
| `` <ctrl+w> `` | Toggle whitespace | Toggle whether or not whitespace changes are shown in the diff view.<br><br>The default can be changed in the config file with the key 'git.ignoreWhitespaceInDiffView'. |
|
||||||
|
| `` % `` | Toggle mouse capture | Toggle whether lazygit captures mouse events. When mouse capture is off, the terminal handles the mouse, so you can select text with it; this is useful in terminals that don't have a modifier key to bypass the capture.<br><br>The default can be changed in the config file with the key 'gui.mouseEvents'. |
|
||||||
| `` <alt+shift+c> `` | Verander config bestand | Open bestand in externe editor. |
|
| `` <alt+shift+c> `` | Verander config bestand | Open bestand in externe editor. |
|
||||||
| `` z `` | Ongedaan maken (via reflog) (experimenteel) | The reflog will be used to determine what git command to run to undo the last git command. This does not include changes to the working tree; only commits are taken into consideration. |
|
| `` z `` | Ongedaan maken (via reflog) (experimenteel) | The reflog will be used to determine what git command to run to undo the last git command. This does not include changes to the working tree; only commits are taken into consideration. |
|
||||||
| `` Z `` | Redo (via reflog) (experimenteel) | The reflog will be used to determine what git command to run to redo the last git command. This does not include changes to the working tree; only commits are taken into consideration. |
|
| `` Z `` | Redo (via reflog) (experimenteel) | The reflog will be used to determine what git command to run to redo the last git command. This does not include changes to the working tree; only commits are taken into consideration. |
|
||||||
|
|||||||
@@ -31,6 +31,7 @@ _This file is auto-generated. To update, make the changes in the pkg/i18n direct
|
|||||||
| `` q, <ctrl+c> `` | Wyjdź | |
|
| `` q, <ctrl+c> `` | Wyjdź | |
|
||||||
| `` <ctrl+z> `` | Suspend the application | |
|
| `` <ctrl+z> `` | Suspend the application | |
|
||||||
| `` <ctrl+w> `` | Przełącz białe znaki | Toggle whether or not whitespace changes are shown in the diff view.<br><br>The default can be changed in the config file with the key 'git.ignoreWhitespaceInDiffView'. |
|
| `` <ctrl+w> `` | Przełącz białe znaki | Toggle whether or not whitespace changes are shown in the diff view.<br><br>The default can be changed in the config file with the key 'git.ignoreWhitespaceInDiffView'. |
|
||||||
|
| `` % `` | Toggle mouse capture | Toggle whether lazygit captures mouse events. When mouse capture is off, the terminal handles the mouse, so you can select text with it; this is useful in terminals that don't have a modifier key to bypass the capture.<br><br>The default can be changed in the config file with the key 'gui.mouseEvents'. |
|
||||||
| `` <alt+shift+c> `` | Edytuj plik konfiguracyjny | Otwórz plik w zewnętrznym edytorze. |
|
| `` <alt+shift+c> `` | Edytuj plik konfiguracyjny | Otwórz plik w zewnętrznym edytorze. |
|
||||||
| `` z `` | Cofnij | Dziennik reflog zostanie użyty do określenia, jakie polecenie git należy uruchomić, aby cofnąć ostatnie polecenie git. Nie obejmuje to zmian w drzewie roboczym; brane są pod uwagę tylko commity. |
|
| `` z `` | Cofnij | Dziennik reflog zostanie użyty do określenia, jakie polecenie git należy uruchomić, aby cofnąć ostatnie polecenie git. Nie obejmuje to zmian w drzewie roboczym; brane są pod uwagę tylko commity. |
|
||||||
| `` Z `` | Ponów | Dziennik reflog zostanie użyty do określenia, jakie polecenie git należy uruchomić, aby ponowić ostatnie polecenie git. Nie obejmuje to zmian w drzewie roboczym; brane są pod uwagę tylko commity. |
|
| `` Z `` | Ponów | Dziennik reflog zostanie użyty do określenia, jakie polecenie git należy uruchomić, aby ponowić ostatnie polecenie git. Nie obejmuje to zmian w drzewie roboczym; brane są pod uwagę tylko commity. |
|
||||||
|
|||||||
@@ -31,6 +31,7 @@ _This file is auto-generated. To update, make the changes in the pkg/i18n direct
|
|||||||
| `` q, <ctrl+c> `` | Sair | |
|
| `` q, <ctrl+c> `` | Sair | |
|
||||||
| `` <ctrl+z> `` | Suspender a aplicação | |
|
| `` <ctrl+z> `` | Suspender a aplicação | |
|
||||||
| `` <ctrl+w> `` | Toggle whitespace | Toggle whether or not whitespace changes are shown in the diff view.<br><br>The default can be changed in the config file with the key 'git.ignoreWhitespaceInDiffView'. |
|
| `` <ctrl+w> `` | Toggle whitespace | Toggle whether or not whitespace changes are shown in the diff view.<br><br>The default can be changed in the config file with the key 'git.ignoreWhitespaceInDiffView'. |
|
||||||
|
| `` % `` | Toggle mouse capture | Toggle whether lazygit captures mouse events. When mouse capture is off, the terminal handles the mouse, so you can select text with it; this is useful in terminals that don't have a modifier key to bypass the capture.<br><br>The default can be changed in the config file with the key 'gui.mouseEvents'. |
|
||||||
| `` <alt+shift+c> `` | Editar arquivo de configuração | Abrir arquivo no editor externo. |
|
| `` <alt+shift+c> `` | Editar arquivo de configuração | Abrir arquivo no editor externo. |
|
||||||
| `` z `` | Desfazer | O reflog será usado para determinar qual comando git para executar para desfazer o último comando git. Isto não inclui mudanças na árvore de trabalho; apenas compromissos são tidos em consideração. |
|
| `` z `` | Desfazer | O reflog será usado para determinar qual comando git para executar para desfazer o último comando git. Isto não inclui mudanças na árvore de trabalho; apenas compromissos são tidos em consideração. |
|
||||||
| `` Z `` | Refazer | O reflog será usado para determinar qual comando git para executar para refazer o último comando git. Isto não inclui mudanças na árvore de trabalho; apenas compromissos são tidos em consideração. |
|
| `` Z `` | Refazer | O reflog será usado para determinar qual comando git para executar para refazer o último comando git. Isto não inclui mudanças na árvore de trabalho; apenas compromissos são tidos em consideração. |
|
||||||
|
|||||||
@@ -31,6 +31,7 @@ _This file is auto-generated. To update, make the changes in the pkg/i18n direct
|
|||||||
| `` q, <ctrl+c> `` | Выйти | |
|
| `` q, <ctrl+c> `` | Выйти | |
|
||||||
| `` <ctrl+z> `` | Suspend the application | |
|
| `` <ctrl+z> `` | Suspend the application | |
|
||||||
| `` <ctrl+w> `` | Переключить отображение изменении пробелов в просмотрщике сравнении | Toggle whether or not whitespace changes are shown in the diff view.<br><br>The default can be changed in the config file with the key 'git.ignoreWhitespaceInDiffView'. |
|
| `` <ctrl+w> `` | Переключить отображение изменении пробелов в просмотрщике сравнении | Toggle whether or not whitespace changes are shown in the diff view.<br><br>The default can be changed in the config file with the key 'git.ignoreWhitespaceInDiffView'. |
|
||||||
|
| `` % `` | Toggle mouse capture | Toggle whether lazygit captures mouse events. When mouse capture is off, the terminal handles the mouse, so you can select text with it; this is useful in terminals that don't have a modifier key to bypass the capture.<br><br>The default can be changed in the config file with the key 'gui.mouseEvents'. |
|
||||||
| `` <alt+shift+c> `` | Редактировать файл конфигурации | Open file in external editor. |
|
| `` <alt+shift+c> `` | Редактировать файл конфигурации | Open file in external editor. |
|
||||||
| `` z `` | Отменить (через reflog) (экспериментальный) | Журнал ссылок (reflog) будет использоваться для определения того, какую команду git запустить, чтобы отменить последнюю команду git. Сюда не входят изменения в рабочем дереве; учитываются только коммиты. |
|
| `` z `` | Отменить (через reflog) (экспериментальный) | Журнал ссылок (reflog) будет использоваться для определения того, какую команду git запустить, чтобы отменить последнюю команду git. Сюда не входят изменения в рабочем дереве; учитываются только коммиты. |
|
||||||
| `` Z `` | Повторить (через reflog) (экспериментальный) | Журнал ссылок (reflog) будет использоваться для определения того, какую команду git нужно запустить, чтобы повторить последнюю команду git. Сюда не входят изменения в рабочем дереве; учитываются только коммиты. |
|
| `` Z `` | Повторить (через reflog) (экспериментальный) | Журнал ссылок (reflog) будет использоваться для определения того, какую команду git нужно запустить, чтобы повторить последнюю команду git. Сюда не входят изменения в рабочем дереве; учитываются только коммиты. |
|
||||||
|
|||||||
@@ -31,6 +31,7 @@ _This file is auto-generated. To update, make the changes in the pkg/i18n direct
|
|||||||
| `` q, <ctrl+c> `` | 退出 | |
|
| `` q, <ctrl+c> `` | 退出 | |
|
||||||
| `` <ctrl+z> `` | 挂起应用程序 | |
|
| `` <ctrl+z> `` | 挂起应用程序 | |
|
||||||
| `` <ctrl+w> `` | 切换是否在差异视图中显示空白字符差异 | 切换是否在差异视图中显示空白字符更改。<br><br>默认值可在配置文件中通过键 'git.ignoreWhitespaceInDiffView' 更改。 |
|
| `` <ctrl+w> `` | 切换是否在差异视图中显示空白字符差异 | 切换是否在差异视图中显示空白字符更改。<br><br>默认值可在配置文件中通过键 'git.ignoreWhitespaceInDiffView' 更改。 |
|
||||||
|
| `` % `` | Toggle mouse capture | Toggle whether lazygit captures mouse events. When mouse capture is off, the terminal handles the mouse, so you can select text with it; this is useful in terminals that don't have a modifier key to bypass the capture.<br><br>The default can be changed in the config file with the key 'gui.mouseEvents'. |
|
||||||
| `` <alt+shift+c> `` | 编辑配置文件 | 使用外部编辑器打开文件 |
|
| `` <alt+shift+c> `` | 编辑配置文件 | 使用外部编辑器打开文件 |
|
||||||
| `` z `` | 撤销 | Reflog将用于确定运行哪个git命令来撤消最后一个git命令。这并不包括对工作树的更改,只考虑提交。 |
|
| `` z `` | 撤销 | Reflog将用于确定运行哪个git命令来撤消最后一个git命令。这并不包括对工作树的更改,只考虑提交。 |
|
||||||
| `` Z `` | 重做 | Reflog将用于确定运行哪个git命令来重做上一个git命令。这并不包括对工作树的更改,只考虑提交。 |
|
| `` Z `` | 重做 | Reflog将用于确定运行哪个git命令来重做上一个git命令。这并不包括对工作树的更改,只考虑提交。 |
|
||||||
|
|||||||
@@ -31,6 +31,7 @@ _This file is auto-generated. To update, make the changes in the pkg/i18n direct
|
|||||||
| `` q, <ctrl+c> `` | 結束 | |
|
| `` q, <ctrl+c> `` | 結束 | |
|
||||||
| `` <ctrl+z> `` | Suspend the application | |
|
| `` <ctrl+z> `` | Suspend the application | |
|
||||||
| `` <ctrl+w> `` | 切換是否在差異檢視中顯示空格變更 | Toggle whether or not whitespace changes are shown in the diff view.<br><br>The default can be changed in the config file with the key 'git.ignoreWhitespaceInDiffView'. |
|
| `` <ctrl+w> `` | 切換是否在差異檢視中顯示空格變更 | Toggle whether or not whitespace changes are shown in the diff view.<br><br>The default can be changed in the config file with the key 'git.ignoreWhitespaceInDiffView'. |
|
||||||
|
| `` % `` | Toggle mouse capture | Toggle whether lazygit captures mouse events. When mouse capture is off, the terminal handles the mouse, so you can select text with it; this is useful in terminals that don't have a modifier key to bypass the capture.<br><br>The default can be changed in the config file with the key 'gui.mouseEvents'. |
|
||||||
| `` <alt+shift+c> `` | 編輯設定檔案 | 使用外部編輯器開啟 |
|
| `` <alt+shift+c> `` | 編輯設定檔案 | 使用外部編輯器開啟 |
|
||||||
| `` z `` | 復原 | 將使用 reflog 確任 git 指令以復原。這不包括工作區更改;只考慮提交。 |
|
| `` z `` | 復原 | 將使用 reflog 確任 git 指令以復原。這不包括工作區更改;只考慮提交。 |
|
||||||
| `` Z `` | 取消復原 | 將使用 reflog 確任 git 指令以重作。這不包括工作區更改;只考慮提交。 |
|
| `` Z `` | 取消復原 | 將使用 reflog 確任 git 指令以重作。這不包括工作區更改;只考慮提交。 |
|
||||||
|
|||||||
@@ -91,6 +91,7 @@ type GuiConfig struct {
|
|||||||
TabWidth int `yaml:"tabWidth" jsonschema:"minimum=1"`
|
TabWidth int `yaml:"tabWidth" jsonschema:"minimum=1"`
|
||||||
// If true, capture mouse events.
|
// If true, capture mouse events.
|
||||||
// When mouse events are captured, it's a little harder to select text: e.g. requiring you to hold the option key when on macOS.
|
// When mouse events are captured, it's a little harder to select text: e.g. requiring you to hold the option key when on macOS.
|
||||||
|
// Mouse capture can also be toggled at runtime with the 'toggleMouseCapture' keybinding ('%' by default).
|
||||||
MouseEvents bool `yaml:"mouseEvents"`
|
MouseEvents bool `yaml:"mouseEvents"`
|
||||||
// If true, do not show a warning when amending a commit.
|
// If true, do not show a warning when amending a commit.
|
||||||
SkipAmendWarning bool `yaml:"skipAmendWarning"`
|
SkipAmendWarning bool `yaml:"skipAmendWarning"`
|
||||||
@@ -548,6 +549,7 @@ type KeybindingUniversalConfig struct {
|
|||||||
SubmitEditorText Keybinding `yaml:"submitEditorText"`
|
SubmitEditorText Keybinding `yaml:"submitEditorText"`
|
||||||
ExtrasMenu Keybinding `yaml:"extrasMenu"`
|
ExtrasMenu Keybinding `yaml:"extrasMenu"`
|
||||||
ToggleWhitespaceInDiffView Keybinding `yaml:"toggleWhitespaceInDiffView"`
|
ToggleWhitespaceInDiffView Keybinding `yaml:"toggleWhitespaceInDiffView"`
|
||||||
|
ToggleMouseCapture Keybinding `yaml:"toggleMouseCapture"`
|
||||||
IncreaseContextInDiffView Keybinding `yaml:"increaseContextInDiffView"`
|
IncreaseContextInDiffView Keybinding `yaml:"increaseContextInDiffView"`
|
||||||
DecreaseContextInDiffView Keybinding `yaml:"decreaseContextInDiffView"`
|
DecreaseContextInDiffView Keybinding `yaml:"decreaseContextInDiffView"`
|
||||||
IncreaseRenameSimilarityThreshold Keybinding `yaml:"increaseRenameSimilarityThreshold"`
|
IncreaseRenameSimilarityThreshold Keybinding `yaml:"increaseRenameSimilarityThreshold"`
|
||||||
@@ -1066,6 +1068,7 @@ func GetDefaultConfigForPlatform(platform string) *UserConfig {
|
|||||||
SubmitEditorText: Keybinding{"<enter>"},
|
SubmitEditorText: Keybinding{"<enter>"},
|
||||||
ExtrasMenu: Keybinding{"@"},
|
ExtrasMenu: Keybinding{"@"},
|
||||||
ToggleWhitespaceInDiffView: Keybinding{"<ctrl+w>"},
|
ToggleWhitespaceInDiffView: Keybinding{"<ctrl+w>"},
|
||||||
|
ToggleMouseCapture: Keybinding{"%"},
|
||||||
IncreaseContextInDiffView: Keybinding{"}"},
|
IncreaseContextInDiffView: Keybinding{"}"},
|
||||||
DecreaseContextInDiffView: Keybinding{"{"},
|
DecreaseContextInDiffView: Keybinding{"{"},
|
||||||
IncreaseRenameSimilarityThreshold: Keybinding{")"},
|
IncreaseRenameSimilarityThreshold: Keybinding{")"},
|
||||||
|
|||||||
@@ -136,6 +136,12 @@ func (self *GlobalController) GetKeybindings(opts types.KeybindingsOpts) []*type
|
|||||||
Description: self.c.Tr.ToggleWhitespaceInDiffView,
|
Description: self.c.Tr.ToggleWhitespaceInDiffView,
|
||||||
Tooltip: self.c.Tr.ToggleWhitespaceInDiffViewTooltip,
|
Tooltip: self.c.Tr.ToggleWhitespaceInDiffViewTooltip,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
Keys: opts.GetKeys(opts.Config.Universal.ToggleMouseCapture),
|
||||||
|
Handler: self.toggleMouseCapture,
|
||||||
|
Description: self.c.Tr.ToggleMouseCapture,
|
||||||
|
Tooltip: self.c.Tr.ToggleMouseCaptureTooltip,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
Keys: opts.GetKeys(opts.Config.Universal.EditConfig),
|
Keys: opts.GetKeys(opts.Config.Universal.EditConfig),
|
||||||
Handler: self.editConfig,
|
Handler: self.editConfig,
|
||||||
@@ -273,6 +279,20 @@ func (self *GlobalController) toggleWhitespace() error {
|
|||||||
return (&ToggleWhitespaceAction{c: self.c}).Call()
|
return (&ToggleWhitespaceAction{c: self.c}).Call()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (self *GlobalController) toggleMouseCapture() error {
|
||||||
|
userConfig := self.c.UserConfig()
|
||||||
|
userConfig.Gui.MouseEvents = !userConfig.Gui.MouseEvents
|
||||||
|
self.c.GocuiGui().Mouse = userConfig.Gui.MouseEvents
|
||||||
|
|
||||||
|
if userConfig.Gui.MouseEvents {
|
||||||
|
self.c.Toast(self.c.Tr.MouseCaptureEnabled)
|
||||||
|
} else {
|
||||||
|
self.c.Toast(self.c.Tr.MouseCaptureDisabled)
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
func (self *GlobalController) editConfig() error {
|
func (self *GlobalController) editConfig() error {
|
||||||
return (&EditConfigAction{c: self.c}).Call()
|
return (&EditConfigAction{c: self.c}).Call()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -779,6 +779,10 @@ type TranslationSet struct {
|
|||||||
ToggleWhitespaceInDiffViewTooltip string
|
ToggleWhitespaceInDiffViewTooltip string
|
||||||
IgnoreWhitespaceDiffViewSubTitle string
|
IgnoreWhitespaceDiffViewSubTitle string
|
||||||
IgnoreWhitespaceNotSupportedHere string
|
IgnoreWhitespaceNotSupportedHere string
|
||||||
|
ToggleMouseCapture string
|
||||||
|
ToggleMouseCaptureTooltip string
|
||||||
|
MouseCaptureEnabled string
|
||||||
|
MouseCaptureDisabled string
|
||||||
IncreaseContextInDiffView string
|
IncreaseContextInDiffView string
|
||||||
IncreaseContextInDiffViewTooltip string
|
IncreaseContextInDiffViewTooltip string
|
||||||
DecreaseContextInDiffView string
|
DecreaseContextInDiffView string
|
||||||
@@ -1931,6 +1935,10 @@ func EnglishTranslationSet() *TranslationSet {
|
|||||||
ToggleWhitespaceInDiffViewTooltip: "Toggle whether or not whitespace changes are shown in the diff view.\n\nThe default can be changed in the config file with the key 'git.ignoreWhitespaceInDiffView'.",
|
ToggleWhitespaceInDiffViewTooltip: "Toggle whether or not whitespace changes are shown in the diff view.\n\nThe default can be changed in the config file with the key 'git.ignoreWhitespaceInDiffView'.",
|
||||||
IgnoreWhitespaceDiffViewSubTitle: "(ignoring whitespace)",
|
IgnoreWhitespaceDiffViewSubTitle: "(ignoring whitespace)",
|
||||||
IgnoreWhitespaceNotSupportedHere: "Ignoring whitespace is not supported in this view",
|
IgnoreWhitespaceNotSupportedHere: "Ignoring whitespace is not supported in this view",
|
||||||
|
ToggleMouseCapture: "Toggle mouse capture",
|
||||||
|
ToggleMouseCaptureTooltip: "Toggle whether lazygit captures mouse events. When mouse capture is off, the terminal handles the mouse, so you can select text with it; this is useful in terminals that don't have a modifier key to bypass the capture.\n\nThe default can be changed in the config file with the key 'gui.mouseEvents'.",
|
||||||
|
MouseCaptureEnabled: "Mouse capture enabled",
|
||||||
|
MouseCaptureDisabled: "Mouse capture disabled",
|
||||||
IncreaseContextInDiffView: "Increase diff context size",
|
IncreaseContextInDiffView: "Increase diff context size",
|
||||||
IncreaseContextInDiffViewTooltip: "Increase the amount of the context shown around changes in the diff view.\n\nThe default can be changed in the config file with the key 'git.diffContextSize'.",
|
IncreaseContextInDiffViewTooltip: "Increase the amount of the context shown around changes in the diff view.\n\nThe default can be changed in the config file with the key 'git.diffContextSize'.",
|
||||||
DecreaseContextInDiffView: "Decrease diff context size",
|
DecreaseContextInDiffView: "Decrease diff context size",
|
||||||
|
|||||||
@@ -0,0 +1,21 @@
|
|||||||
|
package misc
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/jesseduffield/lazygit/pkg/config"
|
||||||
|
. "github.com/jesseduffield/lazygit/pkg/integration/components"
|
||||||
|
)
|
||||||
|
|
||||||
|
var ToggleMouseCapture = NewIntegrationTest(NewIntegrationTestArgs{
|
||||||
|
Description: "Toggle mouse capture off and back on with the global keybinding",
|
||||||
|
ExtraCmdArgs: []string{},
|
||||||
|
Skip: false,
|
||||||
|
SetupConfig: func(config *config.AppConfig) {},
|
||||||
|
SetupRepo: func(shell *Shell) {},
|
||||||
|
Run: func(t *TestDriver, keys config.KeybindingConfig) {
|
||||||
|
t.GlobalPress(keys.Universal.ToggleMouseCapture)
|
||||||
|
t.ExpectToast(Equals("Mouse capture disabled"))
|
||||||
|
|
||||||
|
t.GlobalPress(keys.Universal.ToggleMouseCapture)
|
||||||
|
t.ExpectToast(Equals("Mouse capture enabled"))
|
||||||
|
},
|
||||||
|
})
|
||||||
@@ -347,6 +347,7 @@ var tests = []*components.IntegrationTest{
|
|||||||
misc.DirenvUnloadsOnBlockedEnvrc,
|
misc.DirenvUnloadsOnBlockedEnvrc,
|
||||||
misc.InitialOpen,
|
misc.InitialOpen,
|
||||||
misc.RecentReposOnLaunch,
|
misc.RecentReposOnLaunch,
|
||||||
|
misc.ToggleMouseCapture,
|
||||||
patch_building.Apply,
|
patch_building.Apply,
|
||||||
patch_building.ApplyInReverse,
|
patch_building.ApplyInReverse,
|
||||||
patch_building.ApplyInReverseWithConflict,
|
patch_building.ApplyInReverseWithConflict,
|
||||||
|
|||||||
@@ -540,7 +540,7 @@
|
|||||||
},
|
},
|
||||||
"mouseEvents": {
|
"mouseEvents": {
|
||||||
"type": "boolean",
|
"type": "boolean",
|
||||||
"description": "If true, capture mouse events.\nWhen mouse events are captured, it's a little harder to select text: e.g. requiring you to hold the option key when on macOS.",
|
"description": "If true, capture mouse events.\nWhen mouse events are captured, it's a little harder to select text: e.g. requiring you to hold the option key when on macOS.\nMouse capture can also be toggled at runtime with the 'toggleMouseCapture' keybinding ('%' by default).",
|
||||||
"default": true
|
"default": true
|
||||||
},
|
},
|
||||||
"skipAmendWarning": {
|
"skipAmendWarning": {
|
||||||
@@ -3335,6 +3335,20 @@
|
|||||||
],
|
],
|
||||||
"default": "\u003cctrl+w\u003e"
|
"default": "\u003cctrl+w\u003e"
|
||||||
},
|
},
|
||||||
|
"toggleMouseCapture": {
|
||||||
|
"oneOf": [
|
||||||
|
{
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"items": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"type": "array"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"default": "%"
|
||||||
|
},
|
||||||
"increaseContextInDiffView": {
|
"increaseContextInDiffView": {
|
||||||
"oneOf": [
|
"oneOf": [
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user