Skip to content

Commit

Permalink
fix editor paste bug
Browse files Browse the repository at this point in the history
  • Loading branch information
SilenZcience committed Nov 21, 2024
1 parent 469b90c commit ae75c28
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cat_win/src/service/editor.py
Original file line number Diff line number Diff line change
Expand Up @@ -530,10 +530,12 @@ def _key_add_chunk(self, wchars_: str) -> str:
self.window_content[self.cpos.row][:self.cpos.col] + segments[-1]
if len(segments) == 1:
self.window_content[self.cpos.row] += end_segment
self.unsaved_progress = True
return wchars_
self.window_content.insert(self.cpos.row+1, segments[0] + end_segment)
for row in segments[1:-1]:
self.window_content.insert(self.cpos.row+1, row)
self.unsaved_progress = True
return wchars_

def _remove_chunk(self) -> None:
Expand Down

0 comments on commit ae75c28

Please sign in to comment.