diff --git a/lazyload/window_handler.vim b/lazyload/window_handler.vim index 598384c..d1a90f9 100644 --- a/lazyload/window_handler.vim +++ b/lazyload/window_handler.vim @@ -101,8 +101,6 @@ def CountCharUntil(line: string, char: string): number break endif endfor - # Only used in yank and has space - counter += 2 return counter enddef @@ -122,7 +120,7 @@ export def PrintResult(ctx: dict, json_msg: dict): void var bin_list = IntToBin(i["match_pos"], len(i["name"])) var col_counter = 0 for j in bin_list - if ctx.mode == "yank" && col_counter < CountCharUntil(i["name"], '|') + if ctx.mode == "yank" && col_counter < CountCharUntil(i["name"], '|') + 2 col_counter += 1 continue endif diff --git a/native/app/json_msg_handler.c b/native/app/json_msg_handler.c index e97a361..ebba479 100644 --- a/native/app/json_msg_handler.c +++ b/native/app/json_msg_handler.c @@ -133,12 +133,6 @@ void handle_json_msg(uv_loop_t *loop, const char *json_str) { } } - FILE *fp = fopen("/var/tmp/t", "a"); - fprintf(fp, "cmd %i\n", seq); - fprintf(fp, "value %s\n", value); - fprintf(fp, "list_cmd %s\n", list_cmd); - fclose(fp); - // No safety here as well, vimscript must set it correctly if (strcmp(cmd, "init_file") == 0 || strcmp(cmd, "file") == 0 || strcmp(cmd, "init_path") == 0 || strcmp(cmd, "path") == 0) { queue_search(loop, cmd, value, list_cmd, seq);