fix a bug mentioned in Issue 96: bad handling for Backspace key

This commit is contained in:
Vincent Wei
2022-11-08 17:22:40 +08:00
parent 26f415f3db
commit d78b493aad
+2 -3
View File
@@ -2542,7 +2542,7 @@ SLEditCtrlProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
return 0;
}
if (wParam == '\b') { // backspace
if (chars == 1 && charBuffer [0] == '\b') { // backspace
int del = 1;
if (sled->editPos == 0 && sled->selStart == sled->selEnd)
@@ -2564,9 +2564,8 @@ SLEditCtrlProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
sleBackspaceText (hWnd, sled, del, FALSE, FALSE);
}
}
else{
else {
if (dwStyle & ES_LEFT) {
//if ((dwStyle&0xffff) == ES_LEFT) {
esleft_input_char_refresh(hWnd, sled, (char*)charBuffer, chars);
set_edit_caret_pos(hWnd, sled);