1
0
Fork 0
mirror of https://gitlab.com/sortix/sortix.git synced 2023-02-13 20:55:38 -05:00

Editor no longer moves the cursor if not needed.

This commit is contained in:
Jonas 'Sortie' Termansen 2011-11-24 19:27:24 +01:00
parent 63b622a086
commit c0fa3a6aae

View file

@ -62,9 +62,16 @@ unsigned textmode()
bool ctrl = false; bool ctrl = false;
int oldcursorx = -1;
int oldcursory = -1;
while ( true ) while ( true )
{
if ( oldcursorx != cursorx || oldcursory != cursory )
{ {
cursorto(cursorx, cursory); cursorto(cursorx, cursory);
oldcursorx = cursorx;
oldcursory = cursory;
}
unsigned method = System::Keyboard::POLL; unsigned method = System::Keyboard::POLL;
uint32_t codepoint = System::Keyboard::ReceiveKeystroke(method); uint32_t codepoint = System::Keyboard::ReceiveKeystroke(method);