… | |
… | |
135 | rxvt_term::iso14755_54 (int x, int y) |
135 | rxvt_term::iso14755_54 (int x, int y) |
136 | { |
136 | { |
137 | x = Pixel2Col (x); |
137 | x = Pixel2Col (x); |
138 | y = Pixel2Row (y); |
138 | y = Pixel2Row (y); |
139 | |
139 | |
140 | if (x < 0 || x >= ncol |
140 | if (!IN_RANGE_EXC (x, 0, ncol) |
141 | || y < 0 || y >= nrow) |
141 | || !IN_RANGE_EXC (y, 0, nrow)) |
142 | return; |
142 | return; |
143 | |
143 | |
144 | for (;;) |
144 | for (;;) |
145 | { |
145 | { |
146 | const line_t &l = save[y + saveLines - view_start]; |
146 | const line_t &l = ROW(y - view_start); |
147 | |
147 | |
148 | text_t t = l.t[x]; |
148 | text_t t = l.t[x]; |
149 | |
149 | |
150 | if (t != NOCHAR || !x) |
150 | if (t != NOCHAR || !x) |
151 | { |
151 | { |
… | |
… | |
154 | break; |
154 | break; |
155 | } |
155 | } |
156 | |
156 | |
157 | x--; |
157 | x--; |
158 | } |
158 | } |
159 | |
|
|
160 | } |
159 | } |
161 | #endif |
160 | #endif |
162 | |
161 | |
163 | #if ENABLE_OVERLAY |
162 | #if ENABLE_OVERLAY |
164 | void |
163 | void |
… | |
… | |
186 | alloc = 0; |
185 | alloc = 0; |
187 | chr = &ch2; |
186 | chr = &ch2; |
188 | len = 1; |
187 | len = 1; |
189 | } |
188 | } |
190 | |
189 | |
|
|
190 | char attr[80]; // plenty |
|
|
191 | |
|
|
192 | sprintf (attr, "%08x = fg %d bg %d%s%s%s%s%s%s", |
|
|
193 | (int)r, |
|
|
194 | GET_FGCOLOR (r), GET_BGCOLOR (r), |
|
|
195 | r & RS_Bold ? " bold" : "", |
|
|
196 | r & RS_Italic ? " italic" : "", |
|
|
197 | r & RS_Blink ? " blink" : "", |
|
|
198 | r & RS_RVid ? " rvid" : "", |
|
|
199 | r & RS_Uline ? " uline" : "", |
|
|
200 | r & RS_Careful ? " careful" : ""); |
|
|
201 | |
191 | int width = wcswidth (fname, wcslen (fname)); |
202 | int width = wcswidth (fname, wcslen (fname)); |
192 | |
203 | |
|
|
204 | max_it (width, 8+5); // for char + hey |
|
|
205 | max_it (width, strlen (attr)); |
|
|
206 | |
193 | scr_overlay_new (0, -1, width < 8+5 ? 8+5 : width, len + 1); |
207 | scr_overlay_new (0, -1, width, len + 2); |
194 | |
208 | |
195 | r = SET_STYLE (OVERLAY_RSTYLE, GET_STYLE (r)); |
209 | r = SET_STYLE (OVERLAY_RSTYLE, GET_STYLE (r)); |
196 | |
210 | |
197 | for (int y = 0; y < len; y++) |
211 | for (int y = 0; y < len; y++) |
198 | { |
212 | { |
… | |
… | |
209 | #endif |
223 | #endif |
210 | scr_overlay_set (11, y, ch, r); |
224 | scr_overlay_set (11, y, ch, r); |
211 | scr_overlay_set (12, y, NOCHAR, r); |
225 | scr_overlay_set (12, y, NOCHAR, r); |
212 | } |
226 | } |
213 | |
227 | |
|
|
228 | scr_overlay_set (0, len , attr); |
214 | scr_overlay_set (0, len, fname); |
229 | scr_overlay_set (0, len + 1, fname); |
215 | |
230 | |
216 | free (fname); |
231 | free (fname); |
217 | |
232 | |
218 | #if ENABLE_COMBINING |
233 | #if ENABLE_COMBINING |
219 | if (alloc) |
234 | if (alloc) |
… | |
… | |
1035 | { |
1050 | { |
1036 | if (mouse_slip_wheel_speed == 0 |
1051 | if (mouse_slip_wheel_speed == 0 |
1037 | || mouse_slip_wheel_speed < 0 ? scr_page (DN, -mouse_slip_wheel_speed) |
1052 | || mouse_slip_wheel_speed < 0 ? scr_page (DN, -mouse_slip_wheel_speed) |
1038 | : scr_page (UP, mouse_slip_wheel_speed)) |
1053 | : scr_page (UP, mouse_slip_wheel_speed)) |
1039 | { |
1054 | { |
1040 | if (view_start == nscrolled || |
1055 | if (view_start == nsaved || |
1041 | view_start == 0) |
1056 | view_start == 0) |
1042 | mouse_slip_wheel_speed = 0; |
1057 | mouse_slip_wheel_speed = 0; |
1043 | |
1058 | |
1044 | refresh_type |= SMOOTH_REFRESH; |
1059 | refresh_type |= SMOOTH_REFRESH; |
1045 | want_refresh = 1; |
1060 | want_refresh = 1; |
… | |
… | |
1068 | if (n > 0) |
1083 | if (n > 0) |
1069 | { |
1084 | { |
1070 | cmdbuf_endp += n; |
1085 | cmdbuf_endp += n; |
1071 | return true; |
1086 | return true; |
1072 | } |
1087 | } |
1073 | else if (n < 0 && errno != EAGAIN) |
1088 | else if ((n < 0 && errno != EAGAIN && errno != EINTR) || n == 0) |
|
|
1089 | { |
|
|
1090 | pty_ev.stop (); |
|
|
1091 | |
|
|
1092 | if (!(options & Opt_hold)) |
1074 | destroy (); |
1093 | destroy (); |
|
|
1094 | } |
1075 | |
1095 | |
1076 | return false; |
1096 | return false; |
1077 | } |
1097 | } |
1078 | |
1098 | |
1079 | void |
1099 | void |
… | |
… | |
1601 | } |
1621 | } |
1602 | |
1622 | |
1603 | scroll_selection_lines = Pixel2Height (dist) |
1623 | scroll_selection_lines = Pixel2Height (dist) |
1604 | / SELECTION_SCROLL_LINE_SPEEDUP |
1624 | / SELECTION_SCROLL_LINE_SPEEDUP |
1605 | + 1; |
1625 | + 1; |
1606 | MIN_IT (scroll_selection_lines, |
1626 | min_it (scroll_selection_lines, |
1607 | SELECTION_SCROLL_MAX_LINES); |
1627 | SELECTION_SCROLL_MAX_LINES); |
1608 | } |
1628 | } |
1609 | else |
1629 | else |
1610 | { |
1630 | { |
1611 | /* we are within the text window, so we |
1631 | /* we are within the text window, so we |
… | |
… | |
2452 | nh += sy; |
2472 | nh += sy; |
2453 | ny = -sy; |
2473 | ny = -sy; |
2454 | sy = 0; |
2474 | sy = 0; |
2455 | } |
2475 | } |
2456 | |
2476 | |
2457 | MIN_IT (nw, (unsigned int) (wrootattr.width - sx)); |
2477 | min_it (nw, (unsigned int) (wrootattr.width - sx)); |
2458 | MIN_IT (nh, (unsigned int) (wrootattr.height - sy)); |
2478 | min_it (nh, (unsigned int) (wrootattr.height - sy)); |
2459 | |
2479 | |
2460 | XSync (disp, False); |
2480 | XSync (disp, False); |
2461 | allowedxerror = -1; |
2481 | allowedxerror = -1; |
2462 | image = XGetImage (disp, rootpixmap, sx, sy, nw, nh, AllPlanes, ZPixmap); |
2482 | image = XGetImage (disp, rootpixmap, sx, sy, nw, nh, AllPlanes, ZPixmap); |
2463 | |
2483 | |
… | |
… | |
3352 | |
3372 | |
3353 | case CSI_SD: /* 8.3.114: (1) SCROLL DOWN */ |
3373 | case CSI_SD: /* 8.3.114: (1) SCROLL DOWN */ |
3354 | arg[0] = -arg[0]; |
3374 | arg[0] = -arg[0]; |
3355 | /* FALLTHROUGH */ |
3375 | /* FALLTHROUGH */ |
3356 | case CSI_SU: /* 8.3.148: (1) SCROLL UP */ |
3376 | case CSI_SU: /* 8.3.148: (1) SCROLL UP */ |
3357 | scr_scroll_text (screen.tscroll, screen.bscroll, arg[0], 0); |
3377 | scr_scroll_text (screen.tscroll, screen.bscroll, arg[0]); |
3358 | break; |
3378 | break; |
3359 | |
3379 | |
3360 | case CSI_DA: /* 8.3.24: (0) DEVICE ATTRIBUTES */ |
3380 | case CSI_DA: /* 8.3.24: (0) DEVICE ATTRIBUTES */ |
3361 | tt_write ((const unsigned char *)VT100_ANS, |
3381 | tt_write ((const unsigned char *)VT100_ANS, |
3362 | (unsigned int) (sizeof (VT100_ANS) - 1)); |
3382 | (unsigned int) (sizeof (VT100_ANS) - 1)); |
… | |
… | |
4373 | } |
4393 | } |
4374 | |
4394 | |
4375 | memmove (v_buffer, v_buffer + written, v_buflen); |
4395 | memmove (v_buffer, v_buffer + written, v_buflen); |
4376 | } |
4396 | } |
4377 | else if (written != -1 || (errno != EAGAIN && errno != EINTR)) |
4397 | else if (written != -1 || (errno != EAGAIN && errno != EINTR)) |
4378 | // original code just ignores this... |
4398 | pty_ev.set (EVENT_READ); |
4379 | destroy (); |
|
|
4380 | } |
4399 | } |
4381 | |
4400 | |
4382 | /*----------------------- end-of-file (C source) -----------------------*/ |
4401 | /*----------------------- end-of-file (C source) -----------------------*/ |
4383 | |
4402 | |