mirror of
https://github.com/textmate/textmate.git
synced 2026-04-28 03:00:34 -04:00
Always place bookmarks on top of “search marks”
Logically I think the less temporary marks should be eclipsed, but this currently lead to inconsistencies with respect to hover images, e.g. hovering a search mark that also has a bookmark should show “remove bookmark” which it presently doesn’t, and will require a bit of refactoring to allow. Issue #1132
This commit is contained in:
@@ -679,25 +679,18 @@ private:
|
||||
|
||||
enum bookmark_state_t { kBookmarkNoMark, kBookmarkRegularMark, kBookmarkSearchMark };
|
||||
|
||||
static std::string const kBookmarkType = "bookmark";
|
||||
static std::string const kBookmarkType = "bookmark";
|
||||
static std::string const kSearchmarkType = "search";
|
||||
|
||||
- (NSUInteger)stateForColumnWithIdentifier:(id)columnIdentifier atLine:(NSUInteger)lineNumber
|
||||
{
|
||||
if([columnIdentifier isEqualToString:kBookmarksColumnIdentifier])
|
||||
{
|
||||
ng::buffer_t const& buf = document->buffer();
|
||||
std::map<size_t, std::string> const& marks = buf.get_marks(buf.begin(lineNumber), buf.eol(lineNumber));
|
||||
iterate(pair, marks)
|
||||
{
|
||||
if(pair->second == kBookmarkType)
|
||||
return kBookmarkRegularMark;
|
||||
}
|
||||
|
||||
iterate(pair, marks)
|
||||
{
|
||||
if(pair->second == "search")
|
||||
return kBookmarkSearchMark;
|
||||
}
|
||||
if(!buf.get_marks(buf.begin(lineNumber), buf.eol(lineNumber), kBookmarkType).empty())
|
||||
return kBookmarkRegularMark;
|
||||
if(!buf.get_marks(buf.begin(lineNumber), buf.eol(lineNumber), kSearchmarkType).empty())
|
||||
return kBookmarkSearchMark;
|
||||
return kBookmarkNoMark;
|
||||
}
|
||||
else if([columnIdentifier isEqualToString:kFoldingsColumnIdentifier])
|
||||
|
||||
Reference in New Issue
Block a user