From a27dd15c1f0e69d2259bcc9a7c246edcd7200f67 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Fri, 8 Jul 2022 15:30:10 -0700 Subject: add args to some functions - Text.clip_selection - Text.cut_selection - Text.delete_selection - Text.delete_selection_without_undo - Text.mouse_pos - Text.to_pos --- text.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'text.lua') diff --git a/text.lua b/text.lua index 873bf00..d66adde 100644 --- a/text.lua +++ b/text.lua @@ -49,7 +49,7 @@ function Text.draw(line, line_index, top, left, right) -- don't draw text above screen top if Text.le1(Screen_top1, {line=line_index, pos=pos}) then if Selection1.line then - local lo, hi = Text.clip_selection(line_index, pos, pos+frag_len) + local lo, hi = Text.clip_selection(line_index, pos, pos+frag_len, left, right) Text.draw_highlight(line, x,y, pos, lo,hi) end --? print('drawing '..frag) @@ -184,7 +184,7 @@ function Text.keychord_pressed(chord) record_undo_event({before=before, after=snapshot(Cursor1.line)}) elseif chord == 'backspace' then if Selection1.line then - Text.delete_selection() + Text.delete_selection(Margin_left, App.screen.width-Margin_right) schedule_save() return end @@ -225,7 +225,7 @@ function Text.keychord_pressed(chord) record_undo_event({before=before, after=snapshot(Cursor1.line)}) elseif chord == 'delete' then if Selection1.line then - Text.delete_selection() + Text.delete_selection(Margin_left, App.screen.width-Margin_right) schedule_save() return end -- cgit 1.4.1-2-gfad0