Draft: Fix bug 447820 unlimited history overflows cell positions - Make cell position 64 bit
Konsole uses in many places an integer y*_columns+x as a cell position. This is a remnant from a time when there was a big array containing the whole terminal content. Unfortunately, it is easy to overflow that integer when using an unlimited scrollback history, e.g. on a 212-columns wide terminal, just a little over 10 million lines will overflow it, while the actual storage needed may not be that big, if the actual lines are short on average.
So make that cell position 64 bit, to make overflow more difficult to trigger.
Note that QAccessibleTextInterface still uses int offsets.
To test: for ((i=0;i<$((2147483648/COLUMNS));i++)); do echo $i; done
- Try to select text at the bottom of the screen
- Save Output As...
Edited by Luis Javier Merino