提交 daa9b58d 编写于 作者: J jurgen

SQL editor cursor repositioning

上级 bcce0daf
......@@ -111,6 +111,8 @@ public class DBeaverPreferencesInitializer extends AbstractPreferenceInitializer
PrefUtils.setDefaultPreferenceValue(store, SQLPreferenceConstants.PRINT_MARGIN_COLOR, "230,230,230");
PrefUtils.setDefaultPreferenceValue(store, SQLPreferenceConstants.PRINT_MARGIN_COLUMN, 120);
PrefUtils.setDefaultPreferenceValue(store, SQLPreferenceConstants.RESET_CURSOR_ON_EXECUTE, false);
// Text editor default preferences
PrefUtils.setDefaultPreferenceValue(store, AbstractTextEditor.PREFERENCE_TEXT_DRAG_AND_DROP_ENABLED, true);
......
......@@ -1467,7 +1467,7 @@ public class SQLEditor extends SQLEditorBase implements
if (result.hasError()) {
setStatus(GeneralUtils.getFirstMessage(result.getError()), true);
}
if (!scriptMode) {
if (!scriptMode && dataSourceContainer.getPreferenceStore().getBoolean(SQLPreferenceConstants.RESET_CURSOR_ON_EXECUTE)) {
getSelectionProvider().setSelection(originalSelection);
}
// Get results window (it is possible that it was closed till that moment
......
......@@ -51,6 +51,8 @@ public class SQLPreferenceConstants
public final static String PRINT_MARGIN_COLOR = "SQLEditor.printMarginColor";
public final static String PRINT_MARGIN_COLUMN = "SQLEditor.printMarginColumn";
public final static String RESET_CURSOR_ON_EXECUTE = "SQLEditor.resetCursorOnExecute";
public static final int PROPOSAL_CASE_DEFAULT = 0;
public static final int PROPOSAL_CASE_UPPER = 1;
public static final int PROPOSAL_CASE_LOWER = 2;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册