#65 Sometimes characters on the first row disappear

Закриті
1 рік тому відкрито nuclearkev · 3 коментарів
Kevin "The Nuclear" Bloom відкоментовано 1 рік тому

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.
Kevin "The Nuclear" Bloom відкоментовано 1 рік тому
Власник

Confirmed: after a deletion on the first row, this happens.

Confirmed: after a deletion on the first row, this happens.
Kevin "The Nuclear" Bloom згадано цю проблему в коміті 1 рік тому
nuclearkev перевідкрито 10 місяців тому
Kevin "The Nuclear" Bloom відкоментовано 10 місяців тому
Власник

This is still happening

This is still happening
Kevin "The Nuclear" Bloom відкоментовано 10 місяців тому
Власник

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`.
Kevin "The Nuclear" Bloom згадано цю проблему в коміті 10 місяців тому
Підпишіться щоб приєднатися до обговорення.
Завантажується...
Скасувати
Зберегти
Тут ще немає жодного вмісту.