@@ -2389,6 +2389,9 @@ var BaseDiffView = /** @class */ (function () {
23892389 sessionB: diffModel.sessionB || (diffModel.editorB ? diffModel.editorB.session : new EditSession(diffModel.valueB || "")),
23902390 chunks: []
23912391 });
2392+ if (this.otherEditor && this.activeEditor) {
2393+ this.otherSession.setOption("wrap", this.activeEditor.getOption("wrap"));
2394+ }
23922395 this.setupScrollbars();
23932396 };
23942397 BaseDiffView.prototype.addGutterDecorators = function () {
@@ -3366,15 +3369,18 @@ var InlineDiffView = /** @class */ (function (_super) {
33663369 diffView.sessionA["_emit"]("changeFold", { data: { start: { row: 0 } } });
33673370 diffView.sessionB["_emit"]("changeFold", { data: { start: { row: 0 } } });
33683371 };
3369- InlineDiffView.prototype.onChangeWrapLimit = function () {
3370- this.sessionB.adjustWrapLimit(this.sessionA.$wrapLimit);
3372+ InlineDiffView.prototype.onChangeWrapLimit = function (e, session) {
3373+ this.otherSession.setOption("wrap", session.getOption("wrap"));
3374+ this.otherSession.adjustWrapLimit(session.$wrapLimit);
33713375 this.scheduleRealign();
3376+ this.activeEditor.renderer.updateFull();
33723377 };
33733378 InlineDiffView.prototype.$attachSessionsEventHandlers = function () {
33743379 this.$attachSessionEventHandlers(this.editorA, this.markerA);
33753380 this.$attachSessionEventHandlers(this.editorB, this.markerB);
3376- this.sessionA.on("changeWrapLimit", this.onChangeWrapLimit);
3377- this.sessionA.on("changeWrapMode", this.onChangeWrapLimit);
3381+ var session = this.activeEditor.session;
3382+ session.on("changeWrapLimit", this.onChangeWrapLimit);
3383+ session.on("changeWrapMode", this.onChangeWrapLimit);
33783384 };
33793385 InlineDiffView.prototype.$attachSessionEventHandlers = function (editor, marker) {
33803386 editor.session.on("changeFold", this.onChangeFold);
@@ -3386,8 +3392,9 @@ var InlineDiffView = /** @class */ (function (_super) {
33863392 this.$detachSessionHandlers(this.editorA, this.markerA);
33873393 this.$detachSessionHandlers(this.editorB, this.markerB);
33883394 this.otherSession.bgTokenizer.lines.fill(undefined);
3389- this.sessionA.off("changeWrapLimit", this.onChangeWrapLimit);
3390- this.sessionA.off("changeWrapMode", this.onChangeWrapLimit);
3395+ var session = this.activeEditor.session;
3396+ session.off("changeWrapLimit", this.onChangeWrapLimit);
3397+ session.off("changeWrapMode", this.onChangeWrapLimit);
33913398 };
33923399 InlineDiffView.prototype.$detachSessionHandlers = function (editor, marker) {
33933400 editor.session.removeMarker(marker.id);
@@ -8447,10 +8454,6 @@ var optionGroups = {
84478454 },
84488455 "Keyboard Accessibility Mode": {
84498456 path: "enableKeyboardAccessibility"
8450- },
8451- "Gutter tooltip follows mouse": {
8452- path: "tooltipFollowsMouse",
8453- defaultValue: true
84548457 }
84558458 }
84568459};
@@ -8925,23 +8928,21 @@ var AcePopup = /** @class */ (function () {
89258928 else {
89268929 renderer.$maxPixelHeight = null;
89278930 }
8928- el.style.display = "";
8929- var rootRect = el.offsetParent && el.offsetParent.getBoundingClientRect();
89308931 if (anchor === "top") {
89318932 el.style.top = "";
8932- el.style.bottom = (screenHeight + scrollBarSize - dims.bottom)
8933- - (rootRect ? screenHeight + scrollBarSize - rootRect.bottom : 0) + "px";
8933+ el.style.bottom = (screenHeight + scrollBarSize - dims.bottom) + "px";
89348934 popup.isTopdown = false;
89358935 }
89368936 else {
8937- el.style.top = ( dims.top - (rootRect ? rootRect.top : 0)) + "px";
8937+ el.style.top = dims.top + "px";
89388938 el.style.bottom = "";
89398939 popup.isTopdown = true;
89408940 }
8941+ el.style.display = "";
89418942 var left = pos.left;
89428943 if (left + el.offsetWidth > screenWidth)
89438944 left = screenWidth - el.offsetWidth;
8944- el.style.left = ( left - (rootRect ? rootRect.left : 0)) + "px";
8945+ el.style.left = left + "px";
89458946 el.style.right = "";
89468947 if (!popup.isOpen) {
89478948 popup.isOpen = true;
@@ -8950,6 +8951,7 @@ var AcePopup = /** @class */ (function () {
89508951 }
89518952 popup.anchorPos = pos;
89528953 popup.anchor = anchor;
8954+ dom.$fixPositionBug(el);
89538955 return true;
89548956 };
89558957 popup.show = function (pos, lineHeight, topdownOnly) {
@@ -8983,7 +8985,7 @@ var AcePopup = /** @class */ (function () {
89838985 }
89848986 return AcePopup;
89858987}());
8986- dom.importCssString("\n.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {\n background-color: #CAD6FA;\n z-index: 1;\n}\n.ace_dark.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {\n background-color: #3a674e;\n}\n.ace_editor.ace_autocomplete .ace_line-hover {\n border: 1px solid #abbffe;\n margin-top: -1px;\n background: rgba(233,233,253,0.4);\n position: absolute;\n z-index: 2;\n}\n.ace_dark.ace_editor.ace_autocomplete .ace_line-hover {\n border: 1px solid rgba(109, 150, 13, 0.8);\n background: rgba(58, 103, 78, 0.62);\n}\n.ace_completion-meta {\n opacity: 0.5;\n margin-left: 0.9em;\n}\n.ace_completion-message {\n margin-left: 0.9em;\n color: blue;\n}\n.ace_editor.ace_autocomplete .ace_completion-highlight{\n color: #2d69c7;\n}\n.ace_dark.ace_editor.ace_autocomplete .ace_completion-highlight{\n color: #93ca12;\n}\n.ace_editor.ace_autocomplete {\n width: 300px;\n z-index: 200000;\n border: 1px lightgray solid;\n position: absolute;\n box-shadow: 2px 3px 5px rgba(0,0,0,.2);\n line-height: 1.4;\n background: #fefefe;\n color: #111;\n}\n.ace_dark.ace_editor.ace_autocomplete {\n border: 1px #484747 solid;\n box-shadow: 2px 3px 5px rgba(0, 0, 0, 0.51);\n line-height: 1.4;\n background: #25282c;\n color: #c1c1c1;\n}\n.ace_autocomplete .ace_text-layer {\n width: calc(100% - 8px);\n}\n.ace_autocomplete .ace_line {\n display: flex;\n align-items: center;\n}\n.ace_autocomplete .ace_line > * {\n min-width: 0;\n flex: 0 0 auto;\n}\n.ace_autocomplete .ace_line .ace_ {\n flex: 0 1 auto;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.ace_autocomplete .ace_completion-spacer {\n flex: 1;\n}\n.ace_autocomplete.ace_loading:after {\n content: \"\";\n position: absolute;\n top: 0px;\n height: 2px;\n width: 8%;\n background: blue;\n z-index: 100;\n animation: ace_progress 3s infinite linear;\n animation-delay: 300ms;\n transform: translateX(-100%) scaleX(1);\n}\n@keyframes ace_progress {\n 0% { transform: translateX(-100%) scaleX(1) }\n 50% { transform: translateX(625%) scaleX(2) } \n 100% { transform: translateX(1500%) scaleX(3) } \n}\n@media (prefers-reduced-motion) {\n .ace_autocomplete.ace_loading:after {\n transform: translateX(625%) scaleX(2);\n animation: none;\n }\n}\n", "autocompletion.css", false);
8988+ dom.importCssString("\n.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {\n background-color: #CAD6FA;\n z-index: 1;\n}\n.ace_dark.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {\n background-color: #3a674e;\n}\n.ace_editor.ace_autocomplete .ace_line-hover {\n border: 1px solid #abbffe;\n margin-top: -1px;\n background: rgba(233,233,253,0.4);\n position: absolute;\n z-index: 2;\n}\n.ace_dark.ace_editor.ace_autocomplete .ace_line-hover {\n border: 1px solid rgba(109, 150, 13, 0.8);\n background: rgba(58, 103, 78, 0.62);\n}\n.ace_completion-meta {\n opacity: 0.5;\n margin-left: 0.9em;\n}\n.ace_completion-message {\n margin-left: 0.9em;\n color: blue;\n}\n.ace_editor.ace_autocomplete .ace_completion-highlight{\n color: #2d69c7;\n}\n.ace_dark.ace_editor.ace_autocomplete .ace_completion-highlight{\n color: #93ca12;\n}\n.ace_editor.ace_autocomplete {\n width: 300px;\n z-index: 200000;\n border: 1px lightgray solid;\n position: fixed;\n box-shadow: 2px 3px 5px rgba(0,0,0,.2);\n line-height: 1.4;\n background: #fefefe;\n color: #111;\n}\n.ace_dark.ace_editor.ace_autocomplete {\n border: 1px #484747 solid;\n box-shadow: 2px 3px 5px rgba(0, 0, 0, 0.51);\n line-height: 1.4;\n background: #25282c;\n color: #c1c1c1;\n}\n.ace_autocomplete .ace_text-layer {\n width: calc(100% - 8px);\n}\n.ace_autocomplete .ace_line {\n display: flex;\n align-items: center;\n}\n.ace_autocomplete .ace_line > * {\n min-width: 0;\n flex: 0 0 auto;\n}\n.ace_autocomplete .ace_line .ace_ {\n flex: 0 1 auto;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.ace_autocomplete .ace_completion-spacer {\n flex: 1;\n}\n.ace_autocomplete.ace_loading:after {\n content: \"\";\n position: absolute;\n top: 0px;\n height: 2px;\n width: 8%;\n background: blue;\n z-index: 100;\n animation: ace_progress 3s infinite linear;\n animation-delay: 300ms;\n transform: translateX(-100%) scaleX(1);\n}\n@keyframes ace_progress {\n 0% { transform: translateX(-100%) scaleX(1) }\n 50% { transform: translateX(625%) scaleX(2) } \n 100% { transform: translateX(1500%) scaleX(3) } \n}\n@media (prefers-reduced-motion) {\n .ace_autocomplete.ace_loading:after {\n transform: translateX(625%) scaleX(2);\n animation: none;\n }\n}\n", "autocompletion.css", false);
89878989exports.AcePopup = AcePopup;
89888990exports.$singleLineEditor = $singleLineEditor;
89898991exports.getAriaId = getAriaId;
0 commit comments