2
0
mirror of https://github.com/Ionaru/easy-markdown-editor synced 2025-06-28 05:31:06 -06:00

Merge pull request #384 from Zignature/ZignatureEasyMDE

Fix #381 Accurate line and column count in status bar
This commit is contained in:
Jeroen Akkerman 2022-01-08 21:53:54 +01:00 committed by GitHub
commit 59a676bc8a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2672,7 +2672,9 @@ EasyMDE.prototype.createStatusbar = function (status) {
}; };
onActivity = function (el) { onActivity = function (el) {
var pos = cm.getCursor(); var pos = cm.getCursor();
el.innerHTML = pos.line + ':' + pos.ch; var posLine = pos.line + 1;
var posColumn = pos.ch + 1;
el.innerHTML = posLine + ':' + posColumn;
}; };
} else if (name === 'autosave') { } else if (name === 'autosave') {
defaultValue = function (el) { defaultValue = function (el) {