Commit 295ae393 authored by Deucе's avatar Deucе 👌🏾
Browse files

Small fixes for ugetstr()

- Backtab also exits with K_TABEXIT when the string is selected
- Backspace scrolls the text to the left of the cursor to the right
  if the left of the input is not the start of the string.
parent c967d666
Pipeline #1536 passed with stage
in 9 minutes and 22 seconds
......@@ -2168,6 +2168,7 @@ int ugetstr(int left, int top, int width, char *outstr, int max, long mode, int
if(f == CR
|| (f >= 0xff && f != CIO_KEY_DC)
|| (f == 3840 && mode&K_TABEXIT) // Backtab
|| (f == '\t' && mode&K_TABEXIT)
|| (f == '%' && mode&K_SCANNING)
|| f==CTRL_B
......@@ -2321,6 +2322,8 @@ int ugetstr(int left, int top, int width, char *outstr, int max, long mode, int
for(k=i;k<=j;k++)
str[k]=str[k+1];
}
if (soffset > 0)
soffset--;
continue;
}
break;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment