Skip to content

Commit

Permalink
Merge pull request #2123 from sthilaid/delete-line-improvement
Browse files Browse the repository at this point in the history
Delete line improvement
  • Loading branch information
nesbox authored Feb 10, 2023
2 parents 46fa4a0 + 19672a7 commit c6d753a
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/studio/editors/code.c
Original file line number Diff line number Diff line change
Expand Up @@ -1185,6 +1185,17 @@ static void deleteLine(Code* code)
{
lineend = findLineEnd(code, linestart);
}

const size_t linesize = lineend-linestart;
char* clipboard = (char*)malloc(linesize+1);
if(clipboard)
{
memcpy(clipboard, linestart, linesize);
clipboard[linesize] = '\0';
tic_sys_clipboard_set(clipboard);
free(clipboard);
}


deleteCode(code, linestart, lineend);
code->cursor.position = linestart;
Expand Down

0 comments on commit c6d753a

Please sign in to comment.