@happy-nut/monacori 0.1.18 → 0.1.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/viewer.client.js +2 -2
- package/dist/viewer.css +5 -0
- package/package.json +1 -1
package/dist/viewer.client.js
CHANGED
|
@@ -3362,8 +3362,8 @@ function updateSourceCaret(prev, lines, language) {
|
|
|
3362
3362
|
// same cheap technique the diff caret uses, so holding an arrow key never re-tokenizes a line.
|
|
3363
3363
|
function insertSourceCaret(row, column) {
|
|
3364
3364
|
var cell = row.querySelector('.source-code');
|
|
3365
|
-
if (!cell
|
|
3366
|
-
var pos = diffCaretDomPosition(cell, column);
|
|
3365
|
+
if (!cell) return;
|
|
3366
|
+
var pos = diffCaretDomPosition(cell, column); // empty line: returns {node: cell, offset: 0} so the caret still shows
|
|
3367
3367
|
if (!pos) return;
|
|
3368
3368
|
var span = document.createElement('span');
|
|
3369
3369
|
span.className = 'code-cursor';
|
package/dist/viewer.css
CHANGED
|
@@ -689,6 +689,11 @@ h1 { margin: 0; font-size: 18px; }
|
|
|
689
689
|
key scrolls the view CONTINUOUSLY instead of leaving it still until the caret reaches the viewport edge
|
|
690
690
|
(the "stutter every ~viewport" the user reported). Applies to the source body, the diff, and the sidebar. */
|
|
691
691
|
.source-body, #diff2html-container, .sidebar-scroll { scroll-padding-block: 35vh; }
|
|
692
|
+
/* revealAt() sets scrollTop directly, and scroll-padding only affects scrollIntoView — so near EOF the
|
|
693
|
+
caret can't reach the 42% line and pins to the viewport bottom, where the footer progress bar overlaps
|
|
694
|
+
and HIDES it ("the caret leaves the screen at the end of a file"). Real trailing space lets the last
|
|
695
|
+
lines scroll up to the middle. The diff caret showed this worst (95% vs source's 81%); both get it. */
|
|
696
|
+
.source-body, #diff2html-container { padding-bottom: 45vh; }
|
|
692
697
|
.source-body {
|
|
693
698
|
border: 1px solid var(--border);
|
|
694
699
|
overflow: auto;
|