#65 Sometimes characters on the first row disappear

Fechado
1 ano atrás foi aberto por nuclearkev · 3 comentários

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 comentado 1 ano atrás
Proprietário

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

Confirmed: after a deletion on the first row, this happens.
Kevin "The Nuclear" Bloom citou este problema em um commit 1 ano atrás
Kevin "The Nuclear" Bloom comentado 10 meses atrás
Proprietário

This is still happening

This is still happening
Kevin "The Nuclear" Bloom comentado 10 meses atrás
Proprietário

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 citou este problema em um commit 10 meses atrás
Faça login para participar desta conversação.
Carregando...
Cancelar
Salvar
Ainda não há conteúdo.