File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change 10
10
<string >#!/usr/bin/env bash
11
11
[[ -f "${TM_SUPPORT_PATH}/lib/bash_init.sh" ]] && . "${TM_SUPPORT_PATH}/lib/bash_init.sh"
12
12
13
- if grep <<< ${TM_CURRENT_WORD:-!} -Esq '^[a-zA-Z0-9_]+$'
13
+ term=${TM_SELECTED_TEXT:-$TM_CURRENT_WORD}
14
+
15
+ if grep <<< ${term} -Esq '^[a-zA-Z0-9_]+$'
14
16
then
15
17
if URL=`grep -i "^$TM_CURRENT_WORD=" "$TM_BUNDLE_SUPPORT/documentation.txt"`
16
18
then
17
- URL=${URL:${#TM_CURRENT_WORD }+1}
19
+ URL=${URL:${#term }+1}
18
20
else
19
- URL="function.${TM_CURRENT_WORD //_/-}"
21
+ URL="function.${term //_/-}"
20
22
fi
21
23
if [[ "$PHP_MANUAL_LOCATION" ]]
22
24
then
@@ -26,7 +28,7 @@ if grep <<<${TM_CURRENT_WORD:-!} -Esq '^[a-zA-Z0-9_]+$'
26
28
fi
27
29
if [[ ! -f "$PHP_MANUAL_LOCATION/$URL.html" ]]
28
30
then
29
- exit_show_tool_tip "No documentation found for '$TM_CURRENT_WORD '"
31
+ exit_show_tool_tip "No documentation found for '$term '"
30
32
fi
31
33
. "$TM_SUPPORT_PATH/lib/webpreview.sh"
32
34
html_header "PHP Help" "${TM_FILENAME:-}"
@@ -49,7 +51,7 @@ if grep <<<${TM_CURRENT_WORD:-!} -Esq '^[a-zA-Z0-9_]+$'
49
51
historyList.appendChild(item);
50
52
item.selected = true;
51
53
}
52
-
54
+
53
55
function setupLinks() {
54
56
var link, links = document.links;
55
57
for (i = 0; i < links.length; i++) {
You can’t perform that action at this time.
0 commit comments