Viewing 1 post (of 1 total)
- AuthorPosts
- September 2, 2011 at 6:31 pm #9620Bill_StewartParticipant
// gotoLongestLine.jsee
if (document.selection.IsEmpty) {
var begLine = 1;
var endLine = document.GetLines();
}
else {
var begLine = document.selection.GetTopPointY(eePosLogical);
var endLine = document.selection.GetBottomPointY(eePosLogical);
}
var line = 0;
var maxLen = 0;
for (var n = begLine; n <= endLine; n++) {
var len = document.GetLine(n).length;
if (len > maxLen) {
line = n;
maxLen = len;
}
}
if ((line > 0) && (maxLen> 0))
document.selection.SetActivePoint(eePosLogical, maxLen + 1, line, false); - AuthorPosts
Viewing 1 post (of 1 total)
- You must be logged in to reply to this topic.