Merge text.love
[?]
Jul 11, 2023, 1:41 AM
FM5LDKGT3WB343RD2HV7NTE4CGTMC77BTQNAQ5OSDPXD2PEWKWBACDependencies
- [2]
PCEXCSOWMerge text.love - [3]
RU4HIK43Merge lines.love - [4]
QD4LOFQRMerge text.love - [5]
6LJZN727handle chords - [6]
VXRYVZ74Merge text.love - [7]
UI3IP45FMerge lines.love - [8]
KKMFQDR4editing source code from within the app - [9]
FS2ITYYHrecord a known issue - [10]
2L5MEZV3experiment: new edit namespace - [11]
T4FRZSYLdelete an ancient, unused file - [12]
CE4LZV4Tdrop last couple of manual tests - [13]
QS3YLNKZMerge lines.love - [14]
IGBTDA6YMerge text.love - [15]
2CTN2IEFMerge lines.love - [16]
4YDBYBA4clean up memory leak experiments - [17]
ATQO62TFMerge lines.love - [18]
PJ5PQAQErecord support for multiple versions - [19]
4SR3Z4Y3document the version of LÖVE I've been using - [20]
A4BSGS2CMerge lines.love - [21]
W5H5YI6SMerge text.love - [22]
JKENJ2UGMerge lines.love - [23]
36Z442IVback to commit 8123959e52f without code editing - [24]
2344TV56Merge lines.love - [25]
VHUNJHXBMerge lines.love - [26]
OTIBCAUJlove2d scaffold - [27]
BLWAYPKVextract a module - [28]
YDUIKWSFMerge text.love - [29]
Q6RXCILQMerge text.love - [30]
TVCPXAAUrename - [31]
BJ5X5O4Alet's prevent the text cursor from ever getting on a drawing - [32]
K74U4BAUMerge lines.love - [33]
VP5KC4XZMerge lines.love - [34]
Y5XAFGMWMerge text.love - [35]
66X36NZNa little more prose describing manual_tests - [36]
UAYCSFSKMerge text.love - [37]
RSZD5A7Gforgot to add json.lua - [38]
R5QXEHUIsomebody stop me - [39]
DUHVCYW5Merge text.love - [40]
4U4VQWNYMerge lines.love - [41]
N2NUGNN4include a brief reference enabling many useful apps - [42]
ZLJYLPOTMerge lines.love - [43]
LWPFEZBIMerge lines.love - [44]
QF3HGULOMerge text.love - [45]
LXTTOB33extract a couple of files - [46]
BULPIBEGbeginnings of a module for the text editor - [47]
3PSFWAILMerge lines.love - [48]
VHQCNMARseveral more modules - [49]
JCXL74WVbring back everything from commit a68647ae22 - [50]
D76MS2G2Merge lines.love - [51]
DCO5BQWVMerge lines.love - [52]
2CFLXLIEMerge text.love - [53]
AVTNUQYRbasic test-enabled framework - [54]
OGUV4HSAremove some memory leaks from rendered fragments - [55]
ECBDENZ4Merge text.love - [56]
ONHKBLLCMerge lines.love - [57]
JZR3QMTNMerge lines.love - [58]
D2GCFTTTclean up repl functionality - [59]
TLOAPLBJadd a license - [60]
JOPVPUSAediting source code from within the app - [61]
4HR3G5ZDMerge text.love - [62]
KMSL74GAsupport selections in the source editor - [63]
X43ZIKR3Merge text.love - [64]
73OCE2MCafter much struggle, a brute-force undo - [65]
NMRUNROTMerge lines.love - [66]
MD3W5IRAnew fork: rip out drawing support - [67]
ORKN6EOBMerge lines.love - [68]
JDZVBFEIMerge lines.love - [69]
SGMA5JLEsave the list of tests in repo - [70]
K2X6G75Zstart writing some tests for drawings - [71]
SHUFMMIVMerge text.love - [72]
3QNOKBFMbeginnings of a test harness - [73]
XX7G2FFJintermingle freehand line drawings with text - [74]
VXORMHMEdelete experimental REPL - [75]
AYX33NBCMerge lines.love
Change contents
- file deletion: source_tests.lua source_tests.lua
function test_show_log_browser_side_splits_window_width()-- initialize screen dimensions and indicate that it is maximizedApp.screen.init{width=300, height=300} - file deletion: source.lua source.lua
Editor_state.right = App.screen.width - Margin_rightEditor_state.width = Editor_state.right-Editor_state.leftText.redraw_all(Editor_state)endEditor_state.width = Editor_state.right-Editor_state.leftText.redraw_all(Editor_state)Log_browser_state.left = App.screen.width/2 + Margin_leftLog_browser_state.right = App.screen.width - Margin_rightif Settings == nil then Settings = {} endif Settings.source == nil then Settings.source = {} endSettings.source.x, Settings.source.y, Settings.source.displayindex = App.screen.position()File_navigation.cursors[Editor_state.filename] = {cursor1=Editor_state.cursor1, screen_top1=Editor_state.screen_top1}-- Initialize window width/height and make window resizable.---- I get tempted to have opinions about window dimensions here, but they're-- non-portable:-- - maximizing doesn't work on mobile and messes things up-- - maximizing keeps the title bar on screen in Linux, but off screen on-- Windows. And there's no way to get the height of the title bar.-- It seems more robust to just follow LÖVE's default window size until-- someone overrides it.App.screen.width, App.screen.height, App.screen.flags = App.screen.size()App.screen.flags.resizable = trueif os == 'Linux' then-- love.window.setPosition doesn't quite seem to do what is asked of it on Linux.App.screen.move(settings.x, settings.y-37, settings.displayindex)elseApp.screen.move(settings.x, settings.y, settings.displayindex)endfunction source.set_window_position_from_settings(settings)local os = love.system.getOS()-- set up desired window dimensions and make window resizable_, _, App.screen.flags = App.screen.size()App.screen.flags.resizable = trueApp.screen.width, App.screen.height = settings.width, settings.heightApp.screen.resize(App.screen.width, App.screen.height, App.screen.flags)source.set_window_position_from_settings(settings)Show_log_browser_side = settings.show_log_browser_sidelocal right = App.screen.width - Margin_rightif Show_log_browser_side thenright = App.screen.width/2 - Margin_rightendEditor_state = edit.initialize_state(Margin_top, Margin_left, right, settings.font_height, math.floor(settings.font_height*1.3))Editor_state.filename = settings.filename - file deletion: run.lua run.lua
if Settings == nil then Settings = {} endSettings.x, Settings.y, Settings.displayindex = App.screen.position()return {-- Initialize window width/height and make window resizable.---- I get tempted to have opinions about window dimensions here, but they're-- non-portable:-- - maximizing doesn't work on mobile and messes things up-- - maximizing keeps the title bar on screen in Linux, but off screen on-- Windows. And there's no way to get the height of the title bar.-- It seems more robust to just follow LÖVE's default window size until-- someone overrides it.App.screen.width, App.screen.height, App.screen.flags = App.screen.size()function run.set_window_position_from_settings(settings)local os = love.system.getOS()if os == 'Linux' then-- love.window.setPosition doesn't quite seem to do what is asked of it on Linux.App.screen.move(settings.x, settings.y-37, settings.displayindex)elseApp.screen.move(settings.x, settings.y, settings.displayindex)endendfunction run.initialize_default_settings()local font_height = 20love.graphics.setFont(love.graphics.newFont(font_height))run.set_window_position_from_settings(Settings)Editor_state = edit.initialize_state(Margin_top, Margin_left, App.screen.width-Margin_right, Settings.font_height, math.floor(Settings.font_height*1.3))Editor_state.filename = Settings.filenameEditor_state.screen_top1 = Settings.screen_topEditor_state.cursor1 = Settings.cursorend-- set up desired window dimensions and make window resizable_, _, App.screen.flags = App.screen.size()App.screen.flags.resizable = true - replacement in main.lua at line 89
-- determine default dimensions and flagsApp.screen.width, App.screen.height, App.screen.flags = App.screen.size()-- set up desired window dimensions-- set up desired window dimensions and make window resizable_, _, App.screen.flags = App.screen.size() - edit in main.lua at line 92
App.screen.flags.minwidth = math.min(App.screen.width, 200)App.screen.flags.minheight = math.min(App.screen.height, 200) - replacement in main.lua at line 94
App.screen.move(settings.x, settings.y, settings.displayindex)set_window_position_from_settings(settings) - edit in main.lua at line 101
function set_window_position_from_settings(settings)local os = love.system.getOS()if os == 'Linux' then-- love.window.setPosition doesn't quite seem to do what is asked of it on Linux.App.screen.move(settings.x, settings.y-37, settings.displayindex)elseApp.screen.move(settings.x, settings.y, settings.displayindex)endend - replacement in main.lua at line 121[4.4589]→[4.226:550](∅→∅),[4.550]→[4.4589:4610](∅→∅),[4.4589]→[4.4589:4610](∅→∅),[4.4610]→[4.551:590](∅→∅)
local os = love.system.getOS()if os == 'Android' or os == 'iOS' then-- maximizing on iOS breaks text rendering: https://github.com/deltadaedalus/vudu/issues/7-- no point second-guessing window dimensions on mobileApp.screen.width, App.screen.height, App.screen.flags = App.screen.size()returnend-- maximize windowApp.screen.resize(0, 0) -- maximize-- Initialize window width/height and make window resizable.---- I get tempted to have opinions about window dimensions here, but they're-- non-portable:-- - maximizing doesn't work on mobile and messes things up-- - maximizing keeps the title bar on screen in Linux, but off screen on-- Windows. And there's no way to get the height of the title bar.-- It seems more robust to just follow LÖVE's default window size until-- someone overrides it. - edit in main.lua at line 131
-- shrink height slightly to account for window decorationApp.screen.height = App.screen.height-100App.screen.width = 40*em_width - edit in main.lua at line 132
App.screen.flags.minwidth = math.min(App.screen.width, 200)App.screen.flags.minheight = math.min(App.screen.height, 200)