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.
Some targets were including headers from frameworks not specified in their link dependencies. For a clean build this could cause an issue because the header was not available at the time of building the target.
The updated link dependencies are also based on what a target’s tests require. Ideally tests would have separate link dependencies, but as we don’t want to maintain this manually, this will have to wait until the build system automatically handles link dependencies.
Currently the commit command uses constants from the CommitWindow framework but should actually not be linked with it. However, the optimizer will strip dead code, so it should not result in much if any difference in the resulting binary and does solve a build dependency issue.
We only use the last empty line when there are more than a single line break in the string to be inserted.
The use-case here is having multiple carets and then running a command like “echo foo”. Here we receive “foo\n” which is split into (“foo”, “”), so every second caret would get the empty string inserted.
Previously we only looked at the last caret, and if this one was not a selection then we would treat the multiple carets (selection ranges) as nothing being selected, and thus, a command replacing the carets, would not leave anything selected.
When pasting or using Filter Through Command with multiple carets, we ignore a potential final empty line, this is because our text will be something like “foo\nbar\n” and we split on the newline, so we end up with (“foo”, “bar”, “”) and if we have more than two carets, then we insert the empty string for every third caret.
For a command though we expect there is a 1:1 between number of carets and newlines in the result, so we should never skip the last element.
If there are multiple (discontinuous) selections then this action will drop the last one.
If there are multiple carets (with no selections) then this action will drop all but the first caret.
This makes it possible to combine the “Use Selection for Find / Replace” with a non-simple find action (e.g. “Replace All”).
If any find options are set (case sensitive, regular expression, etc.) then these will trump the options set for the entry on the find clipboard.
This is only when the command input requested is “selection”. In theory it probably should also do this when input is character, word, or line, but in this case, we can end up with overlapping input ranges.