1
0
mirror of https://github.com/salexdv/bsl_console.git synced 2025-02-01 13:08:06 +02:00

Функции для навигации по редактору сравнения

This commit is contained in:
salexdv 2020-12-30 13:41:47 +03:00
parent d584652d71
commit 4414bacbe2

View File

@ -378,6 +378,10 @@ define(['bslGlobals', 'bslMetadata', 'snippets', 'bsl_language', 'vs/editor/edit
original: originalModel,
modified: modifiedModel
});
editor.navi = monaco.editor.createDiffNavigator(editor, {
followsCaret: true,
ignoreCharChanges: true
});
}
else
{
@ -438,6 +442,20 @@ define(['bslGlobals', 'bslMetadata', 'snippets', 'bsl_language', 'vs/editor/edit
}
nextDiff = function() {
if (editor.navi)
editor.navi.next();
}
previousDiff = function() {
if (editor.navi)
editor.navi.previous();
}
editor = undefined;
// Register languages