summaryrefslogtreecommitdiff
path: root/community/vifm/ncurses58.patch
blob: 68e85ca2f47ae61b8d843c9d0558b0fc3c720b42 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
diff -aur vifm-0.5/src/keys.c vifm-0.5-new//src/keys.c
--- vifm-0.5/src/keys.c	2009-05-05 17:49:30.000000000 -0700
+++ vifm-0.5-new//src/keys.c	2011-03-01 14:13:30.443352349 -0800
@@ -721,7 +721,6 @@
 			redrawwin(stat_win);
 			redrawwin(status_bar);
 			redrawwin(pos_win);
-			redrawwin(lwin.title);
 			redrawwin(lwin.win);
 			redrawwin(num_win);
 			redrawwin(rborder);
@@ -740,7 +739,6 @@
 			touchwin(num_win);
 			touchwin(rborder);
 
-			redrawwin(rwin.title);
 			redrawwin(rwin.win);
 			redrawwin(lborder);
 			redrawwin(stat_win);
@@ -768,10 +766,8 @@
 		touchwin(num_win);
 		touchwin(rborder);
 
-		redrawwin(lwin.title);
 		redrawwin(lwin.win);
 		redrawwin(mborder);
-		redrawwin(rwin.title);
 		redrawwin(rwin.win);
 		redrawwin(lborder);
 		redrawwin(stat_win);
diff -aur vifm-0.5/src/ui.c vifm-0.5-new//src/ui.c
--- vifm-0.5/src/ui.c	2009-08-27 07:07:03.000000000 -0700
+++ vifm-0.5-new//src/ui.c	2011-03-01 14:09:59.646687287 -0800
@@ -158,32 +158,32 @@
 	
 	werase(stdscr);
 
-	menu_win = newwin(screen_y - 1, screen_x , 0, 0);
+	menu_win = newwin(screen_y - 1, screen_x , 1, 1);
 	wbkgdset(menu_win, COLOR_PAIR(WIN_COLOR));
 	werase(menu_win);
 
-	sort_win = newwin(NUM_SORT_OPTIONS + 3, 30, (screen_y -12)/2, (screen_x -30)/2);
+	sort_win = newwin(NUM_SORT_OPTIONS + 3, 30, (screen_y -12)/2 > 0 ? (screen_y -12/2) :1, (screen_x -30)/2 > 0 ? (screen_x -30)/2: 1);
 	wbkgdset(sort_win, COLOR_PAIR(WIN_COLOR));
 	werase(sort_win);
 
-	change_win = newwin(20, 30, (screen_y -20)/2, (screen_x -30)/2);
+	change_win = newwin(20, 30, ((screen_y -20)/2 > 0 ? (screen_y -20)/2 : 1), (screen_x -30)/2 > 0 ? (screen_x -30/2) :  1 );
 	wbkgdset(change_win, COLOR_PAIR(WIN_COLOR));
 	werase(change_win);
 
-	error_win = newwin(10, screen_x -2, (screen_y -10)/2, 1);
+	error_win = newwin(10, screen_x -2, (screen_y -10)/2 > 0 ? (screen_y -10)/2 : 1, 1);
 	wbkgdset(error_win, COLOR_PAIR(WIN_COLOR));
 	werase(error_win);
 
-	lborder = newwin(screen_y - 2, 1, 0, 0);
+	lborder = newwin(screen_y - 2, 1, 1, 1);
 
 	wbkgdset(lborder, COLOR_PAIR(BORDER_COLOR));
 
 	werase(lborder);
 
 	if (curr_stats.number_of_windows == 1)
-		lwin.title = newwin(0, screen_x -2, 0, 1);
+		lwin.title = newwin(0, screen_x -2, 1, 1);
 	else
-		lwin.title = newwin(0, screen_x/2 -1, 0, 1);
+		lwin.title = newwin(0, screen_x/2 -1, 1, 1);
 		
 	wattrset(lwin.title, A_BOLD);
 	wbkgdset(lwin.title, COLOR_PAIR(BORDER_COLOR));
@@ -204,16 +204,16 @@
 	lwin.window_rows = y -1;
 	lwin.window_width = x -1;
 
-	mborder = newwin(screen_y, 2, 0, screen_x/2 -1);
+	mborder = newwin(screen_y, 2, 1, screen_x/2 -1 > 0 ? screen_x/2 -1 :  1);
 
 	wbkgdset(mborder, COLOR_PAIR(BORDER_COLOR));
 
 	werase(mborder);
 
 	if (curr_stats.number_of_windows == 1)
-		rwin.title = newwin(0, screen_x -2  , 0, 1);
+		rwin.title = newwin(0, screen_x -2  , 1, 1);
 	else
-		rwin.title = newwin(1, screen_x/2 -1  , 0, screen_x/2 +1);
+		rwin.title = newwin(1, screen_x/2 -1  , 1, screen_x/2 +1 > 0 ? screen_x/2 +1 :1);
 
 	wbkgdset(rwin.title, COLOR_PAIR(BORDER_COLOR));
 	wattrset(rwin.title, A_BOLD);
@@ -224,7 +224,7 @@
 	if (curr_stats.number_of_windows == 1)
 		rwin.win = newwin(screen_y - 3, screen_x -2 , 1, 1);
 	else
-		rwin.win = newwin(screen_y - 3, screen_x/2 -2 , 1, screen_x/2 +1);
+		rwin.win = newwin(screen_y - 3, screen_x/2 -2 , 1, screen_x/2 +1 > 0 ? screen_x/2 +1 : 1);
 
 	keypad(rwin.win, TRUE);
 	wattrset(rwin.win, A_BOLD);
@@ -235,32 +235,32 @@
 	rwin.window_rows = y - 1;
 	rwin.window_width = x -1;
 
-	rborder = newwin(screen_y - 2, 1, 0, screen_x -1);
+	rborder = newwin(screen_y - 2, 1, 1, screen_x -1 > 0 ? screen_x-1 : 1);
 
 	wbkgdset(rborder, COLOR_PAIR(BORDER_COLOR));
 
 	werase(rborder);
 
-	stat_win = newwin(1, screen_x, screen_y -2, 0);
+	stat_win = newwin(1, screen_x, screen_y -2 > 0 ? screen_y -2 : 1, 1);
 
 	wbkgdset(stat_win, COLOR_PAIR(BORDER_COLOR));
 
 	werase(stat_win);
 
-	status_bar = newwin(1, screen_x - 19, screen_y -1, 0);
+	status_bar = newwin(1, screen_x - 19, screen_y -1 > 0 ? screen_y -2: 1, 1);
 	keypad(status_bar, TRUE);
 	wattrset(status_bar, A_BOLD);
 	wattron(status_bar, A_BOLD);
 	wbkgdset(status_bar, COLOR_PAIR(STATUS_BAR_COLOR));
 	werase(status_bar);
 
-	pos_win = newwin(1, 13, screen_y - 1, screen_x -13);
+	pos_win = newwin(1, 13, screen_y - 1 > 0 ? screen_y -1 : 1, screen_x -13 > 0 ? screen_x -13 : 1);
 	wattrset(pos_win, A_BOLD);
 	wattron(pos_win, A_BOLD);
 	wbkgdset(pos_win, COLOR_PAIR(STATUS_BAR_COLOR));
 	werase(pos_win);
 
-	num_win = newwin(1, 6, screen_y - 1, screen_x -19);
+	num_win = newwin(1, 6, screen_y - 1 > 0 ? screen_y -1 : 1, screen_x -19 > 0 ? screen_x -19 : 1);
 	wattrset(num_win, A_BOLD);
 	wattron(num_win, A_BOLD);
 	wbkgdset(num_win, COLOR_PAIR(STATUS_BAR_COLOR));