This seems to happen after a deletion takes place which means it's likely due to something wrong it display.c's trim_window function. My guess is that it thinks the end of the line is before were it actually is due to the gap shrink.
This seems to happen after a deletion takes place which means it's likely due to something wrong it `display.c`'s `trim_window` function. My guess is that it thinks the end of the line is before were it actually is due to the gap shrink.
My past self was partly correct, it is related to the trim_window function (which doesn't exist in version >1.8).
The history goes a little like this: originally ait used tb_clear to clear the screen and repaint the editor. The issue, however, is that this is very slow and due to hilite you would see a pretty bad flicker or even slow-to-act on really big files. To avoid this, I created a function called trim_window that would fill in any "non-data" cells with a space. This fixed many issues with flickering and with trailing characters. This function was then removed and incorporated into the massive and confusing display function. It appears that, for some reason, simply calling tb_set_cell isn't enough to properly clear a cell's value and can sometimes corrupt it's content. At least that's how it appears.
All of this being said, the solution to this issue is to properly overwrite the entire cell buffer when printing it. I'm not sure what the implications to this are and it may cause more bugs in the future. For now, I'm only going manually overwrite the cell buffer inside of display.c that will be used in lieu of tb_set_cell.
My past self was partly correct, it is related to the `trim_window` function (which doesn't exist in version >1.8).
The history goes a little like this: originally `ait` used `tb_clear` to clear the screen and repaint the editor. The issue, however, is that this is very slow and due to `hilite` you would see a pretty bad flicker or even slow-to-act on really big files. To avoid this, I created a function called `trim_window` that would fill in any "non-data" cells with a space. This fixed many issues with flickering and with trailing characters. This function was then removed and incorporated into the massive and confusing `display` function. It appears that, for some reason, simply calling `tb_set_cell` isn't enough to properly clear a cell's value and can sometimes corrupt it's content. At least that's how it appears.
All of this being said, the solution to this issue is to properly overwrite the _entire_ cell buffer when printing it. I'm not sure what the implications to this are and it may cause more bugs in the future. For now, I'm only going manually overwrite the cell buffer inside of `display.c` that will be used in lieu of `tb_set_cell`.
This seems to happen after a deletion takes place which means it's likely due to something wrong it
display.c
'strim_window
function. My guess is that it thinks the end of the line is before were it actually is due to the gap shrink.Confirmed: after a deletion on the first row, this happens.
This is still happening
My past self was partly correct, it is related to the
trim_window
function (which doesn't exist in version >1.8).The history goes a little like this: originally
ait
usedtb_clear
to clear the screen and repaint the editor. The issue, however, is that this is very slow and due tohilite
you would see a pretty bad flicker or even slow-to-act on really big files. To avoid this, I created a function calledtrim_window
that would fill in any "non-data" cells with a space. This fixed many issues with flickering and with trailing characters. This function was then removed and incorporated into the massive and confusingdisplay
function. It appears that, for some reason, simply callingtb_set_cell
isn't enough to properly clear a cell's value and can sometimes corrupt it's content. At least that's how it appears.All of this being said, the solution to this issue is to properly overwrite the entire cell buffer when printing it. I'm not sure what the implications to this are and it may cause more bugs in the future. For now, I'm only going manually overwrite the cell buffer inside of
display.c
that will be used in lieu oftb_set_cell
.