about summary refs log tree commit diff stats
path: root/source.lua
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2022-09-17 10:29:57 -0700
committerKartik K. Agaram <vc@akkartik.com>2022-09-17 10:30:08 -0700
commit69f406202035a3e0b520639a5ca87cd7096c2f99 (patch)
tree39741c24862d3f58732e5c81fb0aebcc9db6eef1 /source.lua
parent0f02efd8ccbfe3ea1b985f1bd2f1bf42f401374d (diff)
downloadtext.love-69f406202035a3e0b520639a5ca87cd7096c2f99.tar.gz
bugfix: source margins when toggling log browser
Running the tests now uglily resizes the window for a second or two.
Diffstat (limited to 'source.lua')
-rw-r--r--source.lua5
1 files changed, 4 insertions, 1 deletions
diff --git a/source.lua b/source.lua
index a4289a0..ddb56d6 100644
--- a/source.lua
+++ b/source.lua
@@ -322,7 +322,10 @@ function source.keychord_pressed(chord, key)
 --?     print('C-l')
     Show_log_browser_side = not Show_log_browser_side
     if Show_log_browser_side then
-      App.screen.width = Log_browser_state.right + Margin_right
+      App.screen.width = math.min(Display_width, App.screen.width*2)
+      Editor_state.right = App.screen.width/2 - Margin_right
+      Log_browser_state.left = App.screen.width/2 + Margin_left
+      Log_browser_state.right = App.screen.width - Margin_right
     else
       App.screen.width = Editor_state.right + Margin_right
     end