Skip to content

MarkdownAura v1.4.1

Choose a tag to compare

@westsource westsource released this 08 Oct 13:03
· 29 commits to main since this release

MarkdownAura 1.4.1

Switching views keeps your place. Moving between preview, split and source used to drop you at the
top of the document: the position was captured after the view had already changed, so it read the
fresh pane and stored zero, and a single pixel value means a different place in each view anyway (the
panes wrap at different widths). The position now travels as anchors plus the fraction of the way
between them
— the same headings and diagram cards split-view sync already used — captured before the
view changes and put back once the new pane has rendered. Measured on the example document: preview →
split → source → preview returns to the same heading and, on a round trip, to the identical pixel;
between two anchors the position matches to within 0.002 of the segment. While the source pane is being
edited CodeMirror replaces the highlighted markup, so there the carry-over is proportional — right in
direction, approximate in detail. Exact where it can be, honest where it cannot.

Opening a file that is already open no longer loses the tab you were reading. That path activated
the tab without capturing the outgoing one's scroll position, so a single click in the explorer could
reset where you were in the document you left. Found while auditing the docs against the code, which is
also what the next paragraph is about.

The README and the design docs were checked line by line against the code, and 40 claims were wrong.
Every one is fixed in this release; the corrections a reader can see are on the README's own pages:
line endings are not shown in the status bar (encodings are, and a file with mixed endings is refused on
save rather than silently normalised), the AppImage does not register itself as a file handler until it
is integrated with the desktop (the deb does, and the app says so instead of failing quietly), the log is
a 1 MB file with three rotations rather than a single 4 MB one, and a crash report is written for a
panic — not for every abnormal exit. The design docs also lost a paragraph describing a WebView2 data
directory probe that was never implemented, and gained the line-ending refusal they had been missing.


切换视图不再丢位置。 在预览、分屏、源码之间切换时,过去会掉回文档顶部:位置是在视图已经切换
之后
才捕获的,读到的是刚亮起来的窗格(scrollTop 为 0),而且单一像素值在三个视图里本来也不是同一个
地方(各窗格的换行宽度不同)。现在位置以锚点 + 锚点之间的比例传递——就是分屏同步一直在用的那套
标题与图表卡片锚点——在切换视图之前捕获,新窗格渲染完成后落位。在示例文档上实测:预览 → 分屏 →
源码 → 预览 回到同一个标题,往返一次像素完全相同;两个锚点之间比例误差在 0.002 以内。源码窗格处于
编辑态时,CodeMirror 会替换掉带锚点的高亮标记,那里退化为比例映射——方向对、细节粗。能精确的地方
精确,不能的地方如实说明。

点开一个已经打开的文件,不再丢掉你正在读的那一页。 这条路径激活标签时没有捕获离开那个标签的滚动
位置,于是资源管理器里的一次单击就可能重置你原本读到哪儿。它是在"文档与代码对账"时被发现的,也就是
下一段说的那件事。

两份 README 与设计文档逐条对着代码核了一遍,40 处说法是错的。 全部在本次修复;读者能看到的部分
在 README 上:状态栏并不显示行尾(它显示编码,而行尾混用的文件在保存时会被拒绝而不是静默统一)、
AppImage 在未与桌面集成前不会把自己注册成文件打开方式(deb 会,且应用会明说而不是静默失败)、日志是
1 MB 加三个轮转而不是一个 4 MB 的文件、崩溃报告只为 panic 写(而不是每次异常退出都写)。设计文档还删掉了
一段描述"WebView2 数据目录探测"的条文——那段东西从来没有实现过——并补上了此前漏写的"行尾混用拒绝保存"。