mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-22 05:16:00 +00:00
current query part fix
This commit is contained in:
@@ -306,6 +306,8 @@
|
||||
function updateAnnotations() {
|
||||
if (!mode?.includes('sql')) return;
|
||||
|
||||
// console.log('UPDATING ANNOTATIONS');
|
||||
|
||||
editor?.session?.setAnnotations([
|
||||
...(queryParts || [])
|
||||
.filter(part => !(errorMessages || []).find(err => err.line == part.trimStart.line))
|
||||
@@ -367,6 +369,7 @@
|
||||
function changedCurrentQueryPart() {
|
||||
if (queryParts.length <= 1) {
|
||||
removeCurrentPartMarker();
|
||||
updateAnnotations();
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -388,7 +391,11 @@
|
||||
((cursor.row == x.end.line && cursor.column <= x.end.column) || cursor.row < x.end.line)
|
||||
);
|
||||
|
||||
if (part?.text != currentPart?.text || part?.start?.position != currentPart?.start?.position) {
|
||||
if (
|
||||
part?.text != currentPart?.text ||
|
||||
part?.start?.position != currentPart?.start?.position ||
|
||||
part?.end?.position != currentPart?.end?.position
|
||||
) {
|
||||
removeCurrentPartMarker();
|
||||
|
||||
currentPart = part;
|
||||
|
||||
Reference in New Issue
Block a user