| 7152 | } |
| 7153 | |
| 7154 | void ShaderViewer::NextBookmark() |
| 7155 | { |
| 7156 | ScintillaEdit *cur = currentScintilla(); |
| 7157 | if(!cur) |
| 7158 | return; |
| 7159 | |
| 7160 | auto itBookmarks = m_Bookmarks.find(cur); |
| 7161 | if(itBookmarks == m_Bookmarks.end() || itBookmarks->empty()) |
| 7162 | return; |
| 7163 | |
| 7164 | sptr_t curLine = cur->lineFromPosition(cur->currentPos()); |
| 7165 | auto itNextBookmark = std::upper_bound(itBookmarks->begin(), itBookmarks->end(), curLine); |
| 7166 | if(itNextBookmark == itBookmarks->end()) |
| 7167 | itNextBookmark = itBookmarks->begin(); |
| 7168 | |
| 7169 | if(*itNextBookmark != curLine) |
| 7170 | cur->gotoLine(*itNextBookmark); |
| 7171 | } |
| 7172 | |
| 7173 | void ShaderViewer::PreviousBookmark() |
| 7174 | { |
nothing calls this directly
no test coverage detected