diff options
author | bptato <nincsnevem662@gmail.com> | 2023-10-01 11:40:11 +0200 |
---|---|---|
committer | bptato <nincsnevem662@gmail.com> | 2023-10-01 11:42:54 +0200 |
commit | a30fe41cc3a964c50ebb30cb49e3e4bc80344d3f (patch) | |
tree | 6beb420458834ba92a3b27a5c0d5191ab6c004ee /src | |
parent | 8cb26e37aad9c4b9b4a719d3a24c4cc8cc4bfc5e (diff) | |
download | chawan-a30fe41cc3a964c50ebb30cb49e3e4bc80344d3f.tar.gz |
container: fix oob in area highlighting
Avoid coloring parts of areas outside the screen.
Diffstat (limited to 'src')
-rw-r--r-- | src/local/container.nim | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/local/container.nim b/src/local/container.nim index dfa70ee9..da13ce02 100644 --- a/src/local/container.nim +++ b/src/local/container.nim @@ -1144,6 +1144,8 @@ proc drawLines*(container: Container, display: var FixedGrid, for hl in hls: let area = hl.colorArea(container.fromy + by, startw .. startw + aw) for i in area: + if i - startw >= container.width: + break var hlformat = display[dls + i - startw].format hlformat.bgcolor = hlcolor display[dls + i - startw].format = hlformat |