Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
mikutter select_next_patch plugin edition fix what we use command 'select_next(一つ下のメッセージを選択)' when tweet of bottom is selected, and we can't use command 'select_next' and 'select_prev'
# -*- coding: utf-8 -*-
Plugin.create :gtk do
def is_bottom_tweet(i_timeline)
tl = widgetof(i_timeline)
if tl
path = tl.cursor[0]
if path
path.next!
if path.indices[0] >= tl.size
return true
end
end
end
return false
end
filter_gui_timeline_move_cursor_to do |i_timeline, message|
if message == :next
begin
message = nil if is_bottom_tweet(i_timeline)
rescue ThreadError
q = Queue.new
deferred {
message = nil if is_bottom_tweet(i_timeline)
q.push(nil)
}
q.pop
end
end
[i_timeline, message]
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment