Added Ctrl+A and Ctrl+E to go to beginning and end of line.

(Also, '^' and '$')
Closes #508.
This commit is contained in:
Hisham
2016-06-15 12:45:23 -03:00
parent 1a13b4d0f4
commit 0128d222b9
5 changed files with 30 additions and 31 deletions

View File

@ -279,7 +279,10 @@ void ScreenManager_run(ScreenManager* this, Panel** lastFocus, int* lastKey) {
continue;
}
case KEY_LEFT:
case KEY_CTRLB:
case KEY_CTRL('B'):
if (this->panelCount < 2) {
goto defaultHandler;
}
if (!this->allowFocusChange)
break;
tryLeft:
@ -290,8 +293,11 @@ void ScreenManager_run(ScreenManager* this, Panel** lastFocus, int* lastKey) {
goto tryLeft;
break;
case KEY_RIGHT:
case KEY_CTRLF:
case KEY_CTRL('F'):
case 9:
if (this->panelCount < 2) {
goto defaultHandler;
}
if (!this->allowFocusChange)
break;
tryRight:
@ -307,6 +313,7 @@ void ScreenManager_run(ScreenManager* this, Panel** lastFocus, int* lastKey) {
quit = true;
continue;
default:
defaultHandler:
sortTimeout = resetSortTimeout;
Panel_onKey(panelFocus, ch);
break;