Created
November 6, 2018 05:39
-
-
Save cobodo/b621cd4bda8dc42c64a2fd50a2dfacb9 to your computer and use it in GitHub Desktop.
tl_slugに含まれるメッセージのうちdescriptionにfooを含むものを探してその位置までスクロールするmikutterコンソールスニペット
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tl_slug = :extract_1234567890 | |
keyword = 'foo' | |
inner_tl = Plugin[:gtk].widgetof(Plugin::GUI::Timeline.cuscaded[tl_slug]) | |
target_path = nil | |
inner_tl.model.each do |model, path, iter| | |
desc = iter[Gtk::TimeLine::InnerTL::MESSAGE].description | |
if desc.scan(keyword).size > 0 | |
target_path = path | |
break | |
end | |
end | |
inner_tl.scroll_to_cell(target_path, nil, false, 0.0, 0.0) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment