From a84d0f406f7f9e5f26c566c1127a7cad1e922a2b Mon Sep 17 00:00:00 2001 From: Gadzhi Kharkharov Date: Thu, 9 Sep 2021 16:35:00 +0300 Subject: [PATCH] upd --- TODO | 2 +- kak/edit.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/TODO b/TODO index 4abdb3c..cdb9733 100644 --- a/TODO +++ b/TODO @@ -4,7 +4,7 @@ - [x] find solution to remove the timeout in Get - [x] learned how channels work while doing this, implemented fsnotify - [x] cat cmd, needs -b flag for specific buffer -- [ ] refactor cat cmd to use readTmp from Get +- [x] refactor cat cmd to use readTmp from Get - [ ] need to be able to create new sessions easily - [ ] ??? buflist should return relative to cwd - [ ] kks-files from non-workdir doesn't work (need to resolve path before cmd.Edit()?) diff --git a/kak/edit.go b/kak/edit.go index 23c691d..b7c85c7 100644 --- a/kak/edit.go +++ b/kak/edit.go @@ -10,7 +10,7 @@ import ( func Edit(line int, col int, filename, session, client string) error { if filename != "" && session != "" && client != "" && client != "-" { - kakEditCmd := fmt.Sprintf("edit %s", filename) + kakEditCmd := fmt.Sprintf("edit -existing %s", filename) Send(kakEditCmd, "", session, client) if line != 0 { @@ -55,7 +55,7 @@ func Edit(line int, col int, filename, session, client string) error { kakExecArgs = append(kakExecArgs, filename) } - fmt.Println("edit", kakExecArgs) + fmt.Println("edit -existing", kakExecArgs) execErr := syscall.Exec(kakBinary, kakExecArgs, os.Environ()) if execErr != nil {