Skip to content

Commit

Permalink
stop looking for hints on line start/end
Browse files Browse the repository at this point in the history
  • Loading branch information
agroszer committed Mar 12, 2014
1 parent 6fd911a commit d8d47d1
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/.komodotools
/build
7 changes: 5 additions & 2 deletions content/koctags.js
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,9 @@ var gKoCtags = {
findHint : function () {
var ke = ko.views.manager.currentView.scimoz;
var curinsert = ke.currentPos;
var curlpos = ke.lineFromPosition(curinsert);
var linestart = ke.positionFromLine(curlpos);
var lineend = ke.getLineEndPosition(curlpos);
var security = 1024;
var found = false;
var lmove = 0;
Expand All @@ -290,7 +293,7 @@ var gKoCtags = {
while ((lmove < security) && !found) {
var lchar = ke.getWCharAt(curinsert - lmove);
var lidx = DELIMITER_LEFT.indexOf(lchar);
if (lidx > -1) {
if ((lidx > -1) || ((curinsert - lmove + 1) == linestart)) {
startpos = curinsert - lmove+1;
var txt = ke.getTextRange(startpos, curinsert);
//alert('x'+txt);
Expand All @@ -308,7 +311,7 @@ var gKoCtags = {
while ((rmove < security) && !found) {
var lchar = ke.getWCharAt(curinsert + rmove);
var lidx = DELIMITER_ANY.indexOf(lchar);
if (lidx > -1) {
if ((lidx > -1) || ((curinsert + rmove) == lineend)) {
endpos = curinsert + rmove;
var txt = ke.getTextRange(startpos, endpos);
//alert('x'+txt);
Expand Down
2 changes: 1 addition & 1 deletion install.rdf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<Description about="urn:mozilla:install-manifest">
<em:id>[email protected]</em:id>
<em:name>koctags</em:name>
<em:version>0.10</em:version>
<em:version>0.11</em:version>
<em:description>exuberant Ctags support for Komodo</em:description>
<em:creator>Adam Groszer</em:creator>
<em:homepageURL>http://community.activestate.com/xpi/koctags</em:homepageURL>
Expand Down
Binary file added koctags-0.11-ko.xpi
Binary file not shown.

0 comments on commit d8d47d1

Please sign in to comment.