Skip to content

Instantly share code, notes, and snippets.

@hiroi01
Last active December 22, 2015 02:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hiroi01/67360d80f6a61492a4a9 to your computer and use it in GitHub Desktop.
Save hiroi01/67360d80f6a61492a4a9 to your computer and use it in GitHub Desktop.
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