show basename in source: split line #1017
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This patch modifies the text shown above the source window as part of the
context_source()
function.I'm working on a complex C++ project, with many directories and files.
Before this change I would get a split with...
────────────────────────── source:/server/externa[...].cpp+130 ────
which does not tell me anything about what file I am in, other than its extension.
After the change, I get something like this:
─────────────── source:/server/externa[...]SendReceive.hpp+110 ────
Depending on the length of the path the following may be shown:
if len(fn) <= 30
elif len(basename(fn)) < 20
<first 15 chars>[...]<basename>
<first 15 chars>[...]<last 10 chars>