Skip to content

Commit 27825bd

Browse files
committed
0.10.0.59: Removed query editor Undo pending full re-implementation, standard CE 2.0 implementation appears insufficient
1 parent 3be2b0f commit 27825bd

3 files changed

Lines changed: 9 additions & 11 deletions

File tree

src/sqlite-ce-edit/editor.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -433,8 +433,8 @@ LRESULT CALLBACK QueryEditProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam
433433
SendMessage(hwnd, EM_SCROLLCARET, 0, 0);
434434
return 0;
435435
}
436-
/* Ctrl+C/V/X/Z - pass through for edit operations */
437-
if (ctrl && (wParam == 'C' || wParam == 'V' || wParam == 'X' || wParam == 'Z'))
436+
/* Ctrl+C/V/X - pass through for edit operations */
437+
if (ctrl && (wParam == 'C' || wParam == 'V' || wParam == 'X'))
438438
return CallWindowProc(g_pfnQueryProc, hwnd, msg, wParam, lParam);
439439
}
440440
/* Update line count on keyup and scroll caret into view for navigation keys */
@@ -464,8 +464,8 @@ LRESULT CALLBACK QueryEditProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam
464464
UpdateLineNumbers();
465465
return r;
466466
}
467-
/* Ctrl+C=3, Ctrl+X=24, Ctrl+Z=26 - pass through */
468-
if (wParam == 3 || wParam == 24 || wParam == 26)
467+
/* Ctrl+C=3, Ctrl+X=24 - pass through */
468+
if (wParam == 3 || wParam == 24)
469469
return CallWindowProc(g_pfnQueryProc, hwnd, msg, wParam, lParam);
470470
return 0;
471471
}

src/sqlite-ce-edit/globals.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ BOOL WINAPI GetSaveFileNameW(CE_OPENFILENAME*);
8787
** Version
8888
**============================================================================*/
8989

90-
#define SQLITECEDIT_VERSION L"0.10.0.56"
90+
#define SQLITECEDIT_VERSION L"0.10.0.59"
9191

9292
/*============================================================================
9393
** Menu IDs

src/sqlite-ce-edit/main.c

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -407,9 +407,8 @@ static LRESULT CALLBACK WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPara
407407
break;
408408
/* Edit menu */
409409
case IDM_UNDO:
410-
if (g_viewMode == VIEW_QUERY)
411-
SendMessage(g_hwndQuery, EM_UNDO, 0, 0);
412-
else if (g_editMode && CanUndo())
410+
/* Query editor undo disabled - CE Edit control is unreliable */
411+
if (g_editMode && CanUndo())
413412
DoUndo();
414413
break;
415414
case IDM_CUT:
@@ -591,9 +590,8 @@ static LRESULT CALLBACK WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPara
591590
int canUndo = 0;
592591
int hasSelection = 0;
593592
int canCut = (g_viewMode == VIEW_QUERY);
594-
if (g_viewMode == VIEW_QUERY)
595-
canUndo = SendMessage(g_hwndQuery, EM_CANUNDO, 0, 0);
596-
else if (g_editMode)
593+
/* Query editor undo disabled - only grid row delete undo */
594+
if (g_editMode)
597595
canUndo = CanUndo();
598596
if (g_viewMode == VIEW_RESULT && g_gridView && g_hwndGrid)
599597
hasSelection = ListView_GetNextItem(g_hwndGrid, -1, LVNI_SELECTED) >= 0;

0 commit comments

Comments
 (0)