mirror of
https://github.com/irssi/irssi.git
synced 2024-09-01 04:14:16 -04:00
Merge pull request #1417 from ailin-nemui/loop
do not freeze on alt+left/right
(cherry picked from commit 0c97433c7c
)
This commit is contained in:
parent
26f9750ad1
commit
93a94308bd
@ -1629,6 +1629,7 @@ static int window_refnum_left(int refnum, int wrap)
|
|||||||
{
|
{
|
||||||
MAIN_WINDOW_REC *find_sticky;
|
MAIN_WINDOW_REC *find_sticky;
|
||||||
WINDOW_REC *window;
|
WINDOW_REC *window;
|
||||||
|
int start_refnum = refnum;
|
||||||
|
|
||||||
window = window_find_refnum(refnum);
|
window = window_find_refnum(refnum);
|
||||||
g_return_val_if_fail(window != NULL, -1);
|
g_return_val_if_fail(window != NULL, -1);
|
||||||
@ -1638,7 +1639,7 @@ static int window_refnum_left(int refnum, int wrap)
|
|||||||
|
|
||||||
do {
|
do {
|
||||||
refnum = window_refnum_prev(refnum, wrap);
|
refnum = window_refnum_prev(refnum, wrap);
|
||||||
if (refnum < 0)
|
if (refnum < 0 || refnum == start_refnum)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
window = window_find_refnum(refnum);
|
window = window_find_refnum(refnum);
|
||||||
@ -1651,6 +1652,7 @@ static int window_refnum_right(int refnum, int wrap)
|
|||||||
{
|
{
|
||||||
MAIN_WINDOW_REC *find_sticky;
|
MAIN_WINDOW_REC *find_sticky;
|
||||||
WINDOW_REC *window;
|
WINDOW_REC *window;
|
||||||
|
int start_refnum = refnum;
|
||||||
|
|
||||||
window = window_find_refnum(refnum);
|
window = window_find_refnum(refnum);
|
||||||
g_return_val_if_fail(window != NULL, -1);
|
g_return_val_if_fail(window != NULL, -1);
|
||||||
@ -1660,7 +1662,7 @@ static int window_refnum_right(int refnum, int wrap)
|
|||||||
|
|
||||||
do {
|
do {
|
||||||
refnum = window_refnum_next(refnum, wrap);
|
refnum = window_refnum_next(refnum, wrap);
|
||||||
if (refnum < 0)
|
if (refnum < 0 || refnum == start_refnum)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
window = window_find_refnum(refnum);
|
window = window_find_refnum(refnum);
|
||||||
|
Loading…
Reference in New Issue
Block a user