Skip to content

Commit

Permalink
Fix unnecessary logs
Browse files Browse the repository at this point in the history
  • Loading branch information
kohnish committed May 21, 2023
1 parent 9cc5a61 commit 33796e1
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 9 deletions.
4 changes: 1 addition & 3 deletions lazyload/window_handler.vim
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -122,7 +120,7 @@ export def PrintResult(ctx: dict<any>, json_msg: dict<any>): 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
Expand Down
6 changes: 0 additions & 6 deletions native/app/json_msg_handler.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 33796e1

Please sign in to comment.