We could implement this by using the public scopes member function though this function includes dynamic scopes such as misspelled ranges which would change the current semantics of the to_xml helper function.
It might actually make sense to make this change, but I’m avoiding functional changes while refactoring.
The intent was to expose indent settings via the UI which is still a goal, but we’ll do a lot of refactoring first, so removing unused public API to make refactoring simpler.
On recent OS versions the /usr/bin/git executable will prompt the user to install git (if Xcode is not already installed) which can cause some user confusion, so we now avoid using /usr/bin/git unless Xcode is installed.
It is not clear to me whether there was a reason that this code was using the basic_tree_t directly or if it was just written before the indexed_map_t layer was introduced.
We always undo the last edit without any coalescing so the user can be sure that ⌘Z only undos the last thing they did. For redo though this makes less sense, although it does break symmetry, i.e. pressing ⌘Z n times will bring us back again by pressing ⇧⌘Z only n-1 times.
This can be used when the key is name spaced, e.g. `/foo/bar` or `foo.bar`. Here we can erase everything under foo by using `/foo/` or `foo.` respectively.
This introduces new scope setting - excludeFromParagraphSelection, that
prevents extending selection to some scopes, eg. on comment.line.
Previously when reformatting paragraph comment lines were selected as paragraph
lines, this have led to mixing comment content into reformatted paragraph
content breaking the syntax of reformatted code, eg.:
some very long ... line of text
# some comment
some other long ... line of text
As an effect we got:
some very long ...
... text # some comment some other ...
... line of text
The problem described above was especially visible when using ⌃Q to Reformat
block of Git commit message, when below of the typed text there was a Git
default comment. Also this problem could be noticeable by authors using LaTeX.
This change checks whether a candidate line scope for paragraph extension has a
excludeFromParagraphSelection set to true and breaks upon such line, eg.
comment line.
Doing Select Paragraph ⌃⌥P again will select the comment as well.
If we fail to load an image by name then we try again with a “Template” suffix so that commands can still set marks using just `note`, `warning`, and `error`.
When loading by full path and the path (minus extension) has a “Template” suffix then we manually set the image’s template property to YES since the system only seems to do this for images loaded from bundles.
The classes should be given as a comma-separated list and is mainly useful because the semantic class system doubles as a way to indicate that an item should be used as a callback.
The rationale for this is that when empty lines are included it leaves no whitespace between functions.
Example and TextMate 1.x behavior described here: http://pastie.org/private/lgtnlvc8tdvghoppocob5q
Previously when a line was a start or stop marker, and was also matched by `foldingIndentedBlockIgnore` then we would set the line’s indent to INT_MAX to ensure the line would not terminate a foldable indented section, i.e. basically storing the “line should be ignored” in the indent since the line’s type was already set to start or stop marker (rather than “ignored line”).
However, the indent is used to pair start/stop markers, so if only one of a start/stop pair was also matched as an ignored line, they would not be considered a pair because of the different indent levels. The opposite could also be the case, where two lines with different indent were both ignored, and this was seen to share the same indent.
This partially reverts commit 337ac1219d.
Previously the heuristic used (when files mix LF, CR, and CRLF) for searching files on disk (find in folder) was not identical to the heuristic used when opening files.
This meant that in rare situations a match could be found at what the find in folder determined to be the n’th line, but when opening the file, it was the m’th line (where m != n).