aboutsummaryrefslogtreecommitdiffstats
path: root/twittperator.js
diff options
context:
space:
mode:
authoranekos2010-09-16 10:27:43 +0000
committeranekos2010-09-16 10:27:43 +0000
commitb588276ea197ec976d5a3c90a3ad46562f65b62e (patch)
tree8c5fb04acccd45d0b8b70391abfcc88d8ac2fdfb /twittperator.js
parent959c1752e36ccccbb0d8c606f5913ba491208ed3 (diff)
downloadvimperator-plugins-b588276ea197ec976d5a3c90a3ad46562f65b62e.tar.bz2
発言に改行が含まれるときに補完がおかしくなるバグを修正
git-svn-id: http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk@38476 d0d07461-0603-4401-acd4-de1884942a52
Diffstat (limited to 'twittperator.js')
-rwxr-xr-xtwittperator.js9
1 files changed, 6 insertions, 3 deletions
diff --git a/twittperator.js b/twittperator.js
index b624f21..98f1057 100755
--- a/twittperator.js
+++ b/twittperator.js
@@ -28,7 +28,7 @@ let PLUGIN_INFO =
<name>Twittperator</name>
<description>Twitter Client using ChirpStream</description>
<description lang="ja">OAuth対応Twitterクライアント</description>
- <version>1.4.4</version>
+ <version>1.4.5</version>
<minVersion>2.3</minVersion>
<maxVersion>2.4</maxVersion>
<author mail="teramako@gmail.com" homepage="http://d.hatena.ne.jp/teramako/">teramako</author>
@@ -1712,6 +1712,9 @@ let PLUGIN_INFO =
function rt(st)
("retweeted_status" in st ? st.retweeted_status : st);
+ function removeNewLine (text)
+ text.replace(/\r\n|[\r\n]/g, ' ');
+
function completer(generator)
function(filter)
(filter ? function(context, args)
@@ -1723,13 +1726,13 @@ let PLUGIN_INFO =
name:
completer(function(s) ["@" + s.user.screen_name, s]),
text:
- completer(function(s) [s.text, s]),
+ completer(function(s) [removeNewLine(s.text), s]),
id:
completer(function(s) [s.id, s]),
name_id:
completer(function(s) ["@" + s.user.screen_name + "#" + s.id, s]),
name_id_text:
- completer(function(s) ["@" + s.user.screen_name + "#" + s.id + ": " + s.text, s]),
+ completer(function(s) ["@" + s.user.screen_name + "#" + s.id + ": " + removeNewLine(s.text), s]),
};
})(); // }}}