aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/editor.mjs
diff options
context:
space:
mode:
Diffstat (limited to 'src/editor.mjs')
-rw-r--r--src/editor.mjs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/editor.mjs b/src/editor.mjs
index 64d5cf6..eb9b5c1 100644
--- a/src/editor.mjs
+++ b/src/editor.mjs
@@ -438,6 +438,8 @@ const menuForEditor = (event, menu) => {
438 `${lastLineIsRefLink ? '' : '\n'}\n[${anchorName}]: ${link}`, 438 `${lastLineIsRefLink ? '' : '\n'}\n[${anchorName}]: ${link}`,
439 { line: Infinity } 439 { line: Infinity }
440 ) 440 )
441 refLinks = getRefLinks()
442 map.renderer.addMarker({xy: [Number(x), Number(y)], title: `${map.id}@${x},${y}`, type: 'circle'})
441 } 443 }
442 }) 444 })
443 menu.insertBefore(item, menu.firstChild) 445 menu.insertBefore(item, menu.firstChild)
@@ -981,9 +983,10 @@ const addMapRandomlyByPreset = () => {
981 yamlText.sort((a, b) => 983 yamlText.sort((a, b) =>
982 order.indexOf(a.split(':')[0]) > order.indexOf(b.split(':')[0]) 984 order.indexOf(a.split(':')[0]) > order.indexOf(b.split(':')[0])
983 ) 985 )
986 const anchor = cm.getCursor()
984 cm.replaceRange( 987 cm.replaceRange(
985 '\n```map\n' + yamlText.join('\n') + '\n```\n', 988 '\n```map\n' + yamlText.join('\n') + '\n```\n',
986 cm.getCursor() 989 anchor
987 ) 990 )
988} 991}
989 992