Skip to content

Commit

Permalink
refactored editor
Browse files Browse the repository at this point in the history
  • Loading branch information
SilenZcience committed Sep 6, 2023
1 parent 519a405 commit be75d38
Show file tree
Hide file tree
Showing 3 changed files with 461 additions and 177 deletions.
4 changes: 2 additions & 2 deletions cat_win/cat.py
Original file line number Diff line number Diff line change
Expand Up @@ -947,14 +947,14 @@ def main():
holder.set_temp_file_stdin(temp_file)
else:
if holder.args_id[ARGS_EDITOR]:
unknown_files = [file for file in unknown_files if Editor.open(file, arg_parser.file_encoding, stdinhelper.write_file, on_windows_os)]
unknown_files = [file for file in unknown_files if Editor.open(file, arg_parser.file_encoding, stdinhelper.write_file, on_windows_os, holder.args_id[ARGS_DEBUG])]
else:
unknown_files = stdinhelper.read_write_files_from_stdin(
unknown_files, arg_parser.file_encoding, on_windows_os, holder.args_id[ARGS_ONELINE])

if holder.args_id[ARGS_EDITOR]:
for file in known_files:
Editor.open(file, arg_parser.file_encoding, stdinhelper.write_file, on_windows_os)
Editor.open(file, arg_parser.file_encoding, stdinhelper.write_file, on_windows_os, holder.args_id[ARGS_DEBUG])

if len(known_files) + len(unknown_files) == 0:
return
Expand Down
Loading

0 comments on commit be75d38

Please sign in to comment.