diff --git a/internal/journal/text_editor.lua b/internal/journal/text_editor.lua index 8bdd0aeb7..a0d650313 100644 --- a/internal/journal/text_editor.lua +++ b/internal/journal/text_editor.lua @@ -369,10 +369,7 @@ function TextEditorView:copy() local curr_line = self.text:sub( self:lineStartOffset(), self:lineEndOffset() - ) - if curr_line:sub(-1,-1) ~= NEWLINE then - curr_line = curr_line .. NEWLINE - end + ):match('^(.-)\n*$') self:setClipboard(curr_line)