Skip to content

Instantly share code, notes, and snippets.

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 shibafu528/99003884055f87ec9c2c63c0bcd663f3 to your computer and use it in GitHub Desktop.
Save shibafu528/99003884055f87ec9c2c63c0bcd663f3 to your computer and use it in GitHub Desktop.
mikutter-uwm-hommageがmikutter 3.7.2以降文字入力時にコケるのを一応回避するやつ
diff --git a/postbox.rb b/postbox.rb
index 0a5a8ce..f0854f3 100644
--- a/postbox.rb
+++ b/postbox.rb
@@ -183,10 +183,20 @@ class Gtk::PostBox
def remain_charcount
count = remain_charcount_org()
- if @extra_widgets[:image]
- count -= 23
+ if Environment::VERSION < [3, 7, 2, 0]
+ if @extra_widgets[:image]
+ count -= 23
+ else
+ count
+ end
else
- count
+ count.next{ |cnt|
+ if @extra_widgets[:image]
+ cnt -= 23
+ else
+ cnt
+ end
+ }
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment