chiark / gitweb /
Put x first in all coordinate pairs.
authorSimon Tatham <anakin@pobox.com>
Thu, 28 Dec 2023 08:32:21 +0000 (08:32 +0000)
committerSimon Tatham <anakin@pobox.com>
Thu, 28 Dec 2023 08:32:21 +0000 (08:32 +0000)
commit3061583382d837e042f1185caea035adcf9d3a03
treed85b55a68c5763cf53a9d5567372036661707dde
parent1131f56d2d4f02dfb24b1aef9a4aed632d0ab6bf
Put x first in all coordinate pairs.

This is the universal convention _almost_ everywhere. When writing
actual curses programs I've sometimes reversed it, because curses's
API puts line before column. But (a) ratatui is the sensible way round
in the first place; (b) if my plan in this code is to localise the
curses-type library as hard as possible into one module, then I
wouldn't want to allow its conventions to leak into the rest of the
code _anyway_.

So, here we speak (x,y) like normal people, and since ratatui happens
to be sensible, we do so _everywhere_; if for some reason we had to
work with actual curses, we'd localise the swap to tui.rs.
src/menu.rs
src/tui.rs