mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-01-07 22:53:45 -06:00
Fix failing feature tests
This commit is contained in:
parent
cc1ce09b73
commit
c0a1429664
@ -73,7 +73,7 @@ export default class CustomEditorView extends EditorView {
|
||||
} else {
|
||||
const line = this.state.doc.line(lineNo);
|
||||
pos = line.from + ch;
|
||||
if(pos > line.to) {
|
||||
if(ch == -1 || pos > line.to) {
|
||||
pos = line.to;
|
||||
}
|
||||
}
|
||||
|
@ -371,24 +371,6 @@ export function MainToolBar({containerRef, onFilterClick, onManageMacros}) {
|
||||
callback: ()=>{onRollbackClick();}
|
||||
}
|
||||
},
|
||||
{
|
||||
shortcut: queryToolPref.indent,
|
||||
options: {
|
||||
callback: ()=>{executeCmd('indentMore');}
|
||||
}
|
||||
},
|
||||
{
|
||||
shortcut: queryToolPref.unindent,
|
||||
options: {
|
||||
callback: ()=>{executeCmd('indentLess');}
|
||||
}
|
||||
},
|
||||
{
|
||||
shortcut: queryToolPref.comment,
|
||||
options: {
|
||||
callback: ()=>{executeCmd('toggleComment');}
|
||||
}
|
||||
},
|
||||
{
|
||||
shortcut: queryToolPref.toggle_case,
|
||||
options: {
|
||||
@ -494,7 +476,7 @@ export function MainToolBar({containerRef, onFilterClick, onManageMacros}) {
|
||||
<PgIconButton title={gettext('Execute script')} icon={<PlayArrowRoundedIcon style={{height: 'unset'}} />}
|
||||
onClick={executeQuery} disabled={buttonsDisabled['execute']} shortcut={queryToolPref.execute_query}/>
|
||||
<PgIconButton title={gettext('Execute options')} icon={<KeyboardArrowDownIcon />} splitButton
|
||||
name="menu-autocommit" ref={autoCommitMenuRef} accesskey={shortcut_key(queryToolPref.btn_delete_row)}
|
||||
name="menu-autocommit" ref={autoCommitMenuRef} accesskey={shortcut_key(queryToolPref.btn_execute_options)}
|
||||
onClick={toggleMenu} disabled={buttonsDisabled['execute-options']}/>
|
||||
</PgButtonGroup>
|
||||
<PgButtonGroup size="small">
|
||||
|
@ -412,7 +412,8 @@ export default function Query() {
|
||||
|
||||
const shortcutOverrideKeys = useMemo(
|
||||
()=>{
|
||||
const queryToolPref = queryToolCtx.preferences.sqleditor;
|
||||
// omit CM internal shortcuts
|
||||
const queryToolPref = _.omit(queryToolCtx.preferences.sqleditor, ['indent', 'unindent', 'comment']);
|
||||
return Object.values(queryToolPref)
|
||||
.filter((p)=>isShortcutValue(p))
|
||||
.map((p)=>({
|
||||
|
@ -936,7 +936,7 @@ class PgadminPage:
|
||||
self.driver.execute_script(
|
||||
"arguments[0].cmView.view.setValue(arguments[1]);"
|
||||
"arguments[0].cmView.view.setCursor("
|
||||
"arguments[0].cmView.view.lineCount(),0);",
|
||||
"arguments[0].cmView.view.lineCount(),-1);",
|
||||
codemirror_ele, field_content)
|
||||
|
||||
def click_tab(self, tab_name):
|
||||
|
Loading…
Reference in New Issue
Block a user