cpjreynolds / rustty

A terminal UI library
https://docs.rs/rustty
MIT License
152 stars 14 forks source link

Indexing into a terminal is by column and row, not by row and column #11

Closed jtepe closed 9 years ago

jtepe commented 9 years ago

From the documentation on the Terminal type I get that something like

term[(2, 3)]

returns the Cell at the third row and fourth column. However, it actually returns the Cell at the third column and fourth row. So it actually is

term[(x, y)]

rather than

term[(y, x)]

That is also reflected in the code. The docs are confusing here.

cpjreynolds commented 9 years ago

Sorry about this! Those docs are out of date at the moment, I'll get on that as soon as I can.

cpjreynolds commented 9 years ago

Closing this, fixed by 6451031.