mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-05-12 04:45:47 +02:00
Support line offset for most common editors by default
This commit is contained in:
parent
f56988039a
commit
866f4b9f0e
2 changed files with 16 additions and 5 deletions
|
@ -47,7 +47,7 @@ func TestEditFileCmdStr(t *testing.T) {
|
|||
gitConfigMockResponses: nil,
|
||||
test: func(cmdStr string, err error) {
|
||||
assert.NoError(t, err)
|
||||
assert.Equal(t, `nano "test"`, cmdStr)
|
||||
assert.Equal(t, `nano +1 "test"`, cmdStr)
|
||||
},
|
||||
},
|
||||
{
|
||||
|
@ -61,7 +61,7 @@ func TestEditFileCmdStr(t *testing.T) {
|
|||
gitConfigMockResponses: map[string]string{"core.editor": "nano"},
|
||||
test: func(cmdStr string, err error) {
|
||||
assert.NoError(t, err)
|
||||
assert.Equal(t, `nano "test"`, cmdStr)
|
||||
assert.Equal(t, `nano +1 "test"`, cmdStr)
|
||||
},
|
||||
},
|
||||
{
|
||||
|
@ -79,6 +79,7 @@ func TestEditFileCmdStr(t *testing.T) {
|
|||
gitConfigMockResponses: nil,
|
||||
test: func(cmdStr string, err error) {
|
||||
assert.NoError(t, err)
|
||||
assert.Equal(t, `nano +1 "test"`, cmdStr)
|
||||
},
|
||||
},
|
||||
{
|
||||
|
@ -96,7 +97,7 @@ func TestEditFileCmdStr(t *testing.T) {
|
|||
gitConfigMockResponses: nil,
|
||||
test: func(cmdStr string, err error) {
|
||||
assert.NoError(t, err)
|
||||
assert.Equal(t, `emacs "test"`, cmdStr)
|
||||
assert.Equal(t, `emacs +1 "test"`, cmdStr)
|
||||
},
|
||||
},
|
||||
{
|
||||
|
@ -111,7 +112,7 @@ func TestEditFileCmdStr(t *testing.T) {
|
|||
gitConfigMockResponses: nil,
|
||||
test: func(cmdStr string, err error) {
|
||||
assert.NoError(t, err)
|
||||
assert.Equal(t, `vi "test"`, cmdStr)
|
||||
assert.Equal(t, `vi +1 "test"`, cmdStr)
|
||||
},
|
||||
},
|
||||
{
|
||||
|
@ -126,7 +127,7 @@ func TestEditFileCmdStr(t *testing.T) {
|
|||
gitConfigMockResponses: nil,
|
||||
test: func(cmdStr string, err error) {
|
||||
assert.NoError(t, err)
|
||||
assert.Equal(t, `vi "file/with space"`, cmdStr)
|
||||
assert.Equal(t, `vi +1 "file/with space"`, cmdStr)
|
||||
},
|
||||
},
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue