mirror of
https://github.com/radareorg/radare2.git
synced 2024-11-27 23:20:40 +00:00
Fixed the bug where the stack pane in V! mode gets stuck when it scrolls down
This commit is contained in:
parent
4fe12f8c41
commit
173c7ee49f
@ -1524,21 +1524,24 @@ R_API char *r_str_ansi_crop(const char *str, ut32 x, ut32 y, ut32 x2, ut32 y2) {
|
||||
str++;
|
||||
ch++;
|
||||
cw = 0;
|
||||
} else if (*str == 0x1b && *(str + 1) == '[') {
|
||||
const char *ptr = str;
|
||||
if ((r_end - r) > 2) {
|
||||
/* copy 0x1b and [ */
|
||||
*r++ = *str++;
|
||||
*r++ = *str++;
|
||||
for (ptr = str; *ptr && *ptr != 'J' && *ptr != 'm' && *ptr != 'H'; ++ptr) {
|
||||
*r++ = *ptr;
|
||||
}
|
||||
*r++ = *ptr++;
|
||||
}
|
||||
str = ptr;
|
||||
} else {
|
||||
if (ch >= y && ch < y2 && cw >= x && cw < x2) {
|
||||
*r++ = *str;
|
||||
if (*str == 0x1b && *(str + 1) == '[') {
|
||||
const char *ptr = str;
|
||||
if ((r_end - r) > 2) {
|
||||
/* copy 0x1b and [ */
|
||||
*r++ = *str++;
|
||||
*r++ = *str++;
|
||||
for (ptr = str; *ptr && *ptr != 'J' && *ptr != 'm' && *ptr != 'H'; ++ptr) {
|
||||
*r++ = *ptr;
|
||||
}
|
||||
*r++ = *ptr++;
|
||||
}
|
||||
str = ptr;
|
||||
continue;
|
||||
} else {
|
||||
*r++ = *str;
|
||||
}
|
||||
}
|
||||
|
||||
/* skip until newline */
|
||||
|
Loading…
Reference in New Issue
Block a user