Make sure width / height parameters are non-negative when informing GDB about console size
When the console view is made invisible via resizing new, `#widthInChars` / `#heightInChars` might be
`-1`, causing error when informing GDB. This commit makes sure it always non-negative (i.e, 0 or more)
--- a/VDBUnixDebuggerConsoleApplication.st Wed Oct 28 10:49:52 2020 +0000
+++ b/VDBUnixDebuggerConsoleApplication.st Mon Nov 16 21:51:00 2020 +0000
@@ -1,6 +1,7 @@
"
jv:vdb - Visual / VM Debugger
Copyright (C) 2015-now Jan Vrany
+Copyright (C) 2020 LabWare
This software is licensed under 'Creative Commons Attribution-NonCommercial 4.0 International License'
@@ -23,6 +24,7 @@
"
jv:vdb - Visual / VM Debugger
Copyright (C) 2015-now Jan Vrany
+Copyright (C) 2020 LabWare
This software is licensed under 'Creative Commons Attribution-NonCommercial 4.0 International License'
@@ -94,11 +96,12 @@
delayedUpdateSize
debugger notNil ifTrue:[
- debugger setParameter: 'width' to: consoleView widthInChars printString.
- debugger setParameter: 'height' to: consoleView heightInChars printString.
+ debugger setParameter: 'width' to: (consoleView widthInChars max: 0) printString.
+ debugger setParameter: 'height' to: (consoleView heightInChars max: 0) printString.
]
"Created: / 20-05-2019 / 13:35:34 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 16-11-2020 / 21:46:52 / Jan Vrany <jan.vrany@labware.com>"
! !
!VDBUnixDebuggerConsoleApplication methodsFor:'initialization & release'!