Skip to content
Snippets Groups Projects
Commit 295ae393 authored by Deucе's avatar Deucе :ok_hand_tone4:
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
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
Pipeline #1536 passed
...@@ -2168,6 +2168,7 @@ int ugetstr(int left, int top, int width, char *outstr, int max, long mode, int ...@@ -2168,6 +2168,7 @@ int ugetstr(int left, int top, int width, char *outstr, int max, long mode, int
if(f == CR if(f == CR
|| (f >= 0xff && f != CIO_KEY_DC) || (f >= 0xff && f != CIO_KEY_DC)
|| (f == 3840 && mode&K_TABEXIT) // Backtab
|| (f == '\t' && mode&K_TABEXIT) || (f == '\t' && mode&K_TABEXIT)
|| (f == '%' && mode&K_SCANNING) || (f == '%' && mode&K_SCANNING)
|| f==CTRL_B || f==CTRL_B
...@@ -2321,6 +2322,8 @@ int ugetstr(int left, int top, int width, char *outstr, int max, long mode, int ...@@ -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++) for(k=i;k<=j;k++)
str[k]=str[k+1]; str[k]=str[k+1];
} }
if (soffset > 0)
soffset--;
continue; continue;
} }
break; break;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment