indent
This commit is contained in:
parent
00c64ed6e4
commit
9fb8f25030
10
main.lua
10
main.lua
|
@ -351,7 +351,10 @@ function App.mousepressed(x,y, mouse_button)
|
|||
Old_cursor1 = Cursor1
|
||||
Old_selection1 = Selection1
|
||||
Mousepress_shift = App.shift_down()
|
||||
Selection1 = {line=line_index, pos=Text.to_pos_on_line(line, x, y)}
|
||||
Selection1 = {
|
||||
line=line_index,
|
||||
pos=Text.to_pos_on_line(line, x, y),
|
||||
}
|
||||
--? print('selection', Selection1.line, Selection1.pos)
|
||||
break
|
||||
end
|
||||
|
@ -384,7 +387,10 @@ function App.mousereleased(x,y, button)
|
|||
if line.mode == 'text' then
|
||||
if Text.in_line(line, x,y, Margin_left, App.screen.width-Margin_right) then
|
||||
--? print('reset selection')
|
||||
Cursor1 = {line=line_index, pos=Text.to_pos_on_line(line, x, y)}
|
||||
Cursor1 = {
|
||||
line=line_index,
|
||||
pos=Text.to_pos_on_line(line, x, y),
|
||||
}
|
||||
--? print('cursor', Cursor1.line, Cursor1.pos)
|
||||
if Mousepress_shift then
|
||||
if Old_selection1.line == nil then
|
||||
|
|
5
text.lua
5
text.lua
|
@ -946,7 +946,10 @@ function Text.tweak_screen_top_and_cursor(left, right)
|
|||
if Text.cursor_past_screen_bottom() then
|
||||
--? print('tweak')
|
||||
local line = Lines[Screen_bottom1.line]
|
||||
Cursor1 = {line=Screen_bottom1.line, pos=Text.to_pos_on_line(line, App.screen.width-5, App.screen.height-5)}
|
||||
Cursor1 = {
|
||||
line=Screen_bottom1.line,
|
||||
pos=Text.to_pos_on_line(line, App.screen.width-5, App.screen.height-5),
|
||||
}
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue