|
|
|
@ -386,16 +386,10 @@ bool Notebook::open(const boost::filesystem::path &file_path_, Position position |
|
|
|
auto prev_it = cursor_locations.begin(); |
|
|
|
auto prev_it = cursor_locations.begin(); |
|
|
|
for(auto it = std::next(prev_it); it != cursor_locations.end();) { |
|
|
|
for(auto it = std::next(prev_it); it != cursor_locations.end();) { |
|
|
|
if(prev_it->view == it->view && abs(prev_it->mark->get_iter().get_line() - it->mark->get_iter().get_line()) <= 2) { |
|
|
|
if(prev_it->view == it->view && abs(prev_it->mark->get_iter().get_line() - it->mark->get_iter().get_line()) <= 2) { |
|
|
|
if(current_cursor_location == it) { |
|
|
|
if(current_cursor_location == it) |
|
|
|
prev_it->view->get_buffer()->delete_mark(prev_it->mark); |
|
|
|
current_cursor_location = prev_it; |
|
|
|
cursor_locations.erase(prev_it); |
|
|
|
it->view->get_buffer()->delete_mark(it->mark); |
|
|
|
prev_it = it; |
|
|
|
it = cursor_locations.erase(it); |
|
|
|
++it; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
else { |
|
|
|
|
|
|
|
it->view->get_buffer()->delete_mark(it->mark); |
|
|
|
|
|
|
|
it = cursor_locations.erase(it); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
else { |
|
|
|
else { |
|
|
|
++it; |
|
|
|
++it; |
|
|
|
|