+ anekos
+ New BSD License
+
+
+ ~からデータを転送していますなどの表示を消したり、ステータスラインに移動したり、echo したり。
+
+ -
+ g:no_reading_do_echo
+ let g:no_reading_do_echo
+ liberator.globalVariables.no_reading_do_echo
+
+
表示をステータスラインに移動
+
+
+ -
+ g:no_reading_on_statusline
+ let g:no_reading_on_statusline
+ liberator.globalVariables.no_reading_on_statusline
+
+
echo で代用
+
+
+
+>;
+// }}}
(function () {
- function doEcho ()
- liberator.globalVariables.no_reading_do_echo;
+ let label;
+ let (
+ sl = document.getElementById('liberator-statusline'),
+ slfu = document.getElementById('liberator-statusline-field-inputbuffer')
+ ) {
+ label = document.createElement('label');
+ label.setAttribute('id', 'vimperator-plugin-no-reading-label');
+ sl.insertBefore(label, slfu);
+ }
+
+ let $ = {
+ get doEcho ()
+ liberator.globalVariables.no_reading_do_echo,
+
+ get onStatusLine ()
+ !!liberator.globalVariables.no_reading_on_statusline
+ };
let (doErase = true)
liberator.plugins.libly.$U.around(
statusline,
'updateUrl',
function (next, args) {
- let [url] = args;
- if (url) {
+ function updateStatus (status) {
doErase = true;
- doEcho() && liberator.echo(url, commandline.FORCE_SINGLELINE)
- } else {
- if (doErase && doEcho())
- liberator.echo('', commandline.FORCE_SINGLELINE)
+ if ($.onStatusLine) {
+ label.tooltipText = status;
+ label.value = status;
+ } else {
+ if ($.doEcho)
+ liberator.echo(status, commandline.FORCE_SINGLELINE)
+ }
+ }
+
+ function showURL () {
+ if ($.onStatusLine) {
+ label.value = '';
+ } else {
+ if (doErase && $.doEcho)
+ liberator.echo('', commandline.FORCE_SINGLELINE)
+ }
doErase = false;
return next();
}
+
+ let [url] = args;
+ return (url ? updateStatus : showURL)(url);
}
);
--
cgit v1.2.3