Created
June 16, 2018 08:38
-
-
Save shibafu528/99003884055f87ec9c2c63c0bcd663f3 to your computer and use it in GitHub Desktop.
mikutter-uwm-hommageがmikutter 3.7.2以降文字入力時にコケるのを一応回避するやつ
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
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