Skip to content

Commit 83972c1

Browse files
committed
Fixed duplication of the link destination preview
If showstatuslinks was set other than 0, there were two link destination previews. Hence fixed so that the Firefox's link preview is shown only when showstatuslinks is 3(new value).
1 parent 5ef0820 commit 83972c1

File tree

2 files changed

+13
-6
lines changed

2 files changed

+13
-6
lines changed

common/content/buffer.js

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -281,8 +281,13 @@ const Buffer = Module("buffer", {
281281
asyncUpdateUI.superapply(this, arguments);
282282
},
283283
setOverLink: function setOverLink(link, b) {
284-
setOverLink.superapply(this, arguments);
285284
let ssli = options["showstatuslinks"];
285+
286+
if (ssli == 3) {
287+
setOverLink.superapply(this, arguments);
288+
return;
289+
}
290+
286291
if (link && ssli) {
287292
if (ssli == 1) {
288293
statusline.updateField("location", "Link: " + link);
@@ -299,7 +304,7 @@ const Buffer = Module("buffer", {
299304
}
300305
else if (ssli == 2)
301306
modes.show();
302-
}
307+
}
303308
},
304309
},
305310

@@ -1792,8 +1797,9 @@ const Buffer = Module("buffer", {
17921797
{
17931798
completer: function (context) [
17941799
["0", "Don't show link destination"],
1795-
["1", "Show the link in the status line"],
1796-
["2", "Show the link in the command line"]
1800+
["1", "Show the link destination in the status line"],
1801+
["2", "Show the link destination in the command line"],
1802+
["3", "Show the link destination in the content area"]
17971803
]
17981804
});
17991805

common/locale/en-US/options.xml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1128,8 +1128,9 @@
11281128

11291129
<dl>
11301130
<dt>0</dt> <dd>Don't show link destination</dd>
1131-
<dt>1</dt> <dd>Show the link in the status line</dd>
1132-
<dt>2</dt> <dd>Show the link in the command line</dd>
1131+
<dt>1</dt> <dd>Show the link destination in the status line</dd>
1132+
<dt>2</dt> <dd>Show the link destination in the command line</dd>
1133+
<dt>3</dt> <dd>Show the link destination in the content area</dd>
11331134
</dl>
11341135
</description>
11351136
</item>

0 commit comments

Comments
 (0)