1
0
Fork 0

Merge pull request #1417 from ailin-nemui/loop

do not freeze on alt+left/right
This commit is contained in:
ailin-nemui 2022-10-15 08:52:20 +02:00 committed by GitHub
commit 0c97433c7c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 2 deletions

View File

@ -1629,6 +1629,7 @@ static int window_refnum_left(int refnum, int wrap)
{
MAIN_WINDOW_REC *find_sticky;
WINDOW_REC *window;
int start_refnum = refnum;
window = window_find_refnum(refnum);
g_return_val_if_fail(window != NULL, -1);
@ -1638,7 +1639,7 @@ static int window_refnum_left(int refnum, int wrap)
do {
refnum = window_refnum_prev(refnum, wrap);
if (refnum < 0)
if (refnum < 0 || refnum == start_refnum)
break;
window = window_find_refnum(refnum);
@ -1651,6 +1652,7 @@ static int window_refnum_right(int refnum, int wrap)
{
MAIN_WINDOW_REC *find_sticky;
WINDOW_REC *window;
int start_refnum = refnum;
window = window_find_refnum(refnum);
g_return_val_if_fail(window != NULL, -1);
@ -1660,7 +1662,7 @@ static int window_refnum_right(int refnum, int wrap)
do {
refnum = window_refnum_next(refnum, wrap);
if (refnum < 0)
if (refnum < 0 || refnum == start_refnum)
break;
window = window_find_refnum(refnum);