Files
neovim/runtime/tutor/zh/vim-01-beginner.tutor.json
brianhuster 1255a8d88d refactor(tutor): reimplement interactive marks as extmark in Lua
Problem:
From https://matrix.to/#/!cylwlNXSwagQmZSkzs:matrix.org/$Ofj-TFIsEMbp0O9OhE8xuZSNi-nhRLtZTOgs6JRLNrs?via=matrix.org&via=gitter.im&via=mozilla.org

In lesson 2.6, users are asked to remove the second, forth and fifth
lines with `dd` command, then they are asked to undo twice to make the
text go back to original state. But after that, the mark ✗ appears
again, which confuses the user because they think they do something
wrong. This is a limitation with the current implementation, which is
based on line number only.

Solution:
Reimplement interactive marks as extmarks in Lua. This also make the
feature less fragile, as users can remove, add some arbitrary lines
without breaking the interactive marks.

Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
2025-07-18 10:04:20 +07:00

48 lines
2.0 KiB
JSON

{
"expect": {
"96": "The cow jumped over the moon.",
"97": "The cow jumped over the moon.",
"117": "There is some text missing from this line.",
"118": "There is some text missing from this line.",
"135": "There is some text missing from this line.",
"136": "There is some text missing from this line.",
"137": "There is also some text missing here.",
"138": "There is also some text missing here.",
"204": "There are some words that don't belong in this sentence.",
"205": "There are some words that don't belong in this sentence.",
"221": "Somebody typed the end of this line twice.",
"259": -1,
"276": "This line of words is cleaned up.",
"292": "1) Roses are red,",
"293": "",
"294": "3) Violets are blue,",
"295": "",
"296": "",
"297": "6) Sugar is sweet",
"298": "7) And so are you.",
"318": "Fix the errors on this line and replace them with undo.",
"319": "Fix the errors on this line and replace them with undo.",
"365": -1,
"366": -1,
"367": -1,
"368": -1,
"384": "When this line was typed in, someone pressed some wrong keys!",
"385": "When this line was typed in, someone pressed some wrong keys!",
"405": "This line has a few words that need changing using the change operator.",
"406": "This line has a few words that need changing using the change operator.",
"426": "The end of this line needs to be corrected using the c$ command.",
"427": "The end of this line needs to be corrected using the c$ command.",
"484": -1,
"502": -1,
"524": "Usually the best time to see the flowers is in the spring.",
"702": -1,
"707": -1,
"723": "This line will allow you to practice appending text to a line.",
"724": "This line will allow you to practice appending text to a line.",
"740": "Adding 123 to 456 gives you 579.",
"741": "Adding 123 to 456 gives you 579.",
"765": "a) This is the first item.",
"766": "b) This is the second item."
}
}