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 1010 <string >#!/usr/bin/env bash
1111[[ -f "${TM_SUPPORT_PATH}/lib/bash_init.sh" ]] && . "${TM_SUPPORT_PATH}/lib/bash_init.sh"
1212
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_]+$'
1416 then
1517 if URL=`grep -i "^$TM_CURRENT_WORD=" "$TM_BUNDLE_SUPPORT/documentation.txt"`
1618 then
17- URL=${URL:${#TM_CURRENT_WORD }+1}
19+ URL=${URL:${#term }+1}
1820 else
19- URL="function.${TM_CURRENT_WORD //_/-}"
21+ URL="function.${term //_/-}"
2022 fi
2123 if [[ "$PHP_MANUAL_LOCATION" ]]
2224 then
@@ -26,7 +28,7 @@ if grep <<<${TM_CURRENT_WORD:-!} -Esq '^[a-zA-Z0-9_]+$'
2628 fi
2729 if [[ ! -f "$PHP_MANUAL_LOCATION/$URL.html" ]]
2830 then
29- exit_show_tool_tip "No documentation found for '$TM_CURRENT_WORD '"
31+ exit_show_tool_tip "No documentation found for '$term '"
3032 fi
3133 . "$TM_SUPPORT_PATH/lib/webpreview.sh"
3234 html_header "PHP Help" "${TM_FILENAME:-}"
@@ -49,7 +51,7 @@ if grep <<<${TM_CURRENT_WORD:-!} -Esq '^[a-zA-Z0-9_]+$'
4951 historyList.appendChild(item);
5052 item.selected = true;
5153 }
52-
54+
5355 function setupLinks() {
5456 var link, links = document.links;
5557 for (i = 0; i < links.length; i++) {
You can’t perform that action at this time.
0 commit comments