snapshot - no, that's all wrong
[?]
May 20, 2022, 11:41 PM
SVJZZDC3K6AKAXHGRNAZKRE2ZXEKJANNLG7LSSUZJARFBL5F7C4ACDependencies
- [2]
RCDVDFJQcomment - [3]
C42QQZSFanother piece of support for line wrapping in cursor up - [4]
H2DPLWMVsnapshot: wrapping long lines at word boundaries - [5]
MGT5FTJ3first stab at supporting wrapping in cursor up - [6]
5ED3YGHWplanning out cursor up/down over wrapped lines - [7]
2FBLO5FHadjust window size - [8]
A2QPFRFJmove - [9]
OIB2QPRCstart remembering where the cursor is drawn in px - [10]
2KRK3OBVdon't rely on defaults - [11]
AVQ5MC5Dfinish uppercasing all globals - [12]
YKRF5V3Zstarting to load/save - [13]
DLQMM265scroll past first page - [14]
LUNH47XXmake text and drawings the same width - [15]
W4UVZETR2 regressions: - [16]
OTIBCAUJlove2d scaffold - [17]
WLHI7KD3new globals: draw partial screen line up top - [18]
MGOQ5XAVstart uppercasing globals - [19]
IYW7X3WLleft/right cursor movement, deleting characters - [20]
2C7CTIQYmake space for multiple kinds of width - [21]
JCSLDGAHbeginnings of support for multiple shapes - [22]
M36DBSDEbit more polish to help screen - [23]
XNFTJHC4split keyboard handling between Text and Drawing - [24]
PWHZPJJMalways show current filename in window title - [25]
FEEGTRGQbugfix: duplicate character on enter - [*]
BULPIBEGbeginnings of a module for the text editor - [*]
HYEAFRZ2split mouse_pressed events between Text and Drawing - [*]
BJ5X5O4Alet's prevent the text cursor from ever getting on a drawing
Change contents
- replacement in text.lua at line 222
if Top_screen_line_starting_pos == 1 thenlocal screen_line_index,screen_line_starting_pos = Text.pos_at_start_of_cursor_screen_line()if screen_line_starting_pos == 1 thenprint('cursor is at first screen line of its line') - replacement in text.lua at line 238
Top_screen_line_starting_pos = screen_line_starting_posprint('previous screen line starts at '..tostring(screen_line_starting_pos)..' of its line')if Screen_top_line == Cursor_line and Top_screen_line_starting_pos == screen_line_starting_pos thenTop_screen_line_starting_pos = screen_line_starting_posend - replacement in text.lua at line 252
local screen_line_index = table.find(Lines[Cursor_line].screen_line_starting_pos, Top_screen_line_starting_pos)print('cursor is NOT at first screen line of its line') - replacement in text.lua at line 254
Top_screen_line_starting_pos = Lines[Cursor_line].screen_line_starting_pos[screen_line_index-1]local s = string.sub(Lines[Cursor_line].data, Top_screen_line_starting_pos)Cursor_pos = Text.nearest_cursor_pos(s, Cursor_x)new_screen_line_starting_pos = Lines[Cursor_line].screen_line_starting_pos[screen_line_index-1]print('switching pos of screen line at cursor from '..tostring(screen_line_starting_pos)..' to '..tostring(new_screen_line_starting_pos))if Screen_top_line == Cursor_line and Top_screen_line_starting_pos == screen_line_starting_pos thenTop_screen_line_starting_pos = new_screen_line_starting_posprint('also setting pos of top of screen to '..tostring(Top_screen_line_starting_pos))endlocal s = string.sub(Lines[Cursor_line].data, new_screen_line_starting_pos)Cursor_pos = new_screen_line_starting_pos + Text.nearest_cursor_pos(s, Cursor_x) - 1print('cursor pos is now '..tostring(Cursor_pos)) - edit in text.lua at line 279
endendendfunction Text.pos_at_start_of_cursor_screen_line()if Lines[Cursor_line].screen_line_starting_pos == nil thenreturn 1,1endfor i=#Lines[Cursor_line].screen_line_starting_pos,1,-1 dolocal spos = Lines[Cursor_line].screen_line_starting_pos[i]if spos <= Cursor_pos thenreturn i,spos - edit in text.lua at line 293
assert(false) - replacement in manual_tests at line 25
if top line wrapped before, it scrolls up by only one screen lineif cursor line wrapped before, it scrolls up by only one screen line - replacement in manual_tests at line 28
if top line wrapped before, it scrolls down by only one screen line[4.1613]if cursor line wrapped before, it scrolls down by only one screen line - replacement in main.lua at line 41
Cursor_pos = 1 -- in Unicode codepoints, from 1 to utf8.len(line) + 1Cursor_pos = 15 -- in Unicode codepoints, from 1 to utf8.len(line) + 1 - replacement in main.lua at line 50
Top_screen_line_starting_pos = 1 -- when top of screen starts in between a wrapped lineTop_screen_line_starting_pos = 6 -- when top of screen starts in between a wrapped line - replacement in main.lua at line 64[4.23]→[4.95:136](∅→∅),[4.95]→[4.95:136](∅→∅),[4.136]→[4.366:434](∅→∅),[4.434]→[4.24:78](∅→∅),[4.102]→[4.24:78](∅→∅),[4.78]→[4.435:505](∅→∅)
love.window.setMode(0, 0) -- maximizeScreen_width, Screen_height, Screen_flags = love.window.getMode()-- shrink slightly to account for window decorationScreen_width = Screen_width-100Screen_height = Screen_height-100--? love.window.setMode(0, 0) -- maximize--? Screen_width, Screen_height, Screen_flags = love.window.getMode()--? -- shrink slightly to account for window decoration--? Screen_width = Screen_width-100--? Screen_height = Screen_height-100Screen_width = 120Screen_height = 200 - replacement in main.lua at line 73
--? Line_width = 100Line_width = math.floor(Screen_width/2/40)*40Line_width = 100--? Line_width = math.floor(Screen_width/2/40)*40