浏览代码

Fixed it_scroll_move(DIR_DOWN) in thumb mode for last line

master
Bert Münnich 13 年前
父节点
当前提交
edd016945a
共有 2 个文件被更改,包括 11 次插入9 次删除
  1. +1
    -1
      Makefile
  2. +10
    -8
      thumbs.c

+ 1
- 1
Makefile 查看文件

@@ -1,4 +1,4 @@
VERSION = git-20120313
VERSION = git-20120316

CC = gcc
CFLAGS = -ansi -Wall -pedantic -O2


+ 10
- 8
thumbs.c 查看文件

@@ -399,14 +399,6 @@ bool tns_move_selection(tns_t *tns, direction_t dir) {
old = tns->sel;

switch (dir) {
case DIR_LEFT:
if (tns->sel > 0)
tns->sel--;
break;
case DIR_RIGHT:
if (tns->sel < tns->cnt - 1)
tns->sel++;
break;
case DIR_UP:
if (tns->sel >= tns->cols)
tns->sel -= tns->cols;
@@ -414,6 +406,16 @@ bool tns_move_selection(tns_t *tns, direction_t dir) {
case DIR_DOWN:
if (tns->sel + tns->cols < tns->cnt)
tns->sel += tns->cols;
else if (tns->sel < tns->cnt - tns->cnt % tns->cols)
tns->sel = tns->cnt - 1;
break;
case DIR_LEFT:
if (tns->sel > 0)
tns->sel--;
break;
case DIR_RIGHT:
if (tns->sel < tns->cnt - 1)
tns->sel++;
break;
}



正在加载...
取消
保存