Skip to content

Commit

Permalink
Fix limit of looking-back to 1 before point.
Browse files Browse the repository at this point in the history
* helm-elisp.el: Do it.
* helm-eshell.el: Do it.
* helm-eval.el: Do it.
  • Loading branch information
thierryvolpiatto committed May 11, 2015
1 parent fa00dee commit 81e3b4f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions helm-elisp.el
Expand Up @@ -356,7 +356,7 @@ If SYM is not documented, return \"Not documented\"."
(end-of-line)
(search-backward tap (point-at-bol) t)
(setq beg (point))
(looking-back "[^'`( ]" 1)))
(looking-back "[^'`( ]" (1- (point)))))
(expand-file-name
(substring-no-properties tap))))
(end (point))
Expand Down Expand Up @@ -390,7 +390,7 @@ Filename completion happen if string start after or between a double quote."
(if (and tap (save-excursion
(end-of-line)
(search-backward tap (point-at-bol) t)
(looking-back "[^'`( ]" 1)))
(looking-back "[^'`( ]" (1- (point)))))
(helm-complete-file-name-at-point)
(helm-lisp-completion-at-point))))

Expand Down
4 changes: 2 additions & 2 deletions helm-eshell.el
Expand Up @@ -178,7 +178,7 @@ The function that call this should set `helm-ec-target' to thing at point."
(args (catch 'eshell-incomplete
(eshell-parse-arguments beg end)))
(target
(or (and (looking-back " " 1) " ")
(or (and (looking-back " " (1- (point))) " ")
(buffer-substring-no-properties
(save-excursion
(eshell-backward-argument 1) (point))
Expand Down Expand Up @@ -232,7 +232,7 @@ The function that call this should set `helm-ec-target' to thing at point."
:resume 'noresume
:input input))
(when (and flag-empty
(looking-back " " 1))
(looking-back " " (1- (point))))
(delete-char -1)))))

(provide 'helm-eshell)
Expand Down
2 changes: 1 addition & 1 deletion helm-eval.el
Expand Up @@ -118,7 +118,7 @@ Should take one arg: the string to display."
(when (member buf helm-eldoc-active-minibuffers-list)
(with-current-buffer buf
(let* ((sym (save-excursion
(unless (looking-back ")\\|\"" 1)
(unless (looking-back ")\\|\"" (1- (point)))
(forward-char -1))
(eldoc-current-symbol)))
(info-fn (eldoc-fnsym-in-current-sexp))
Expand Down

0 comments on commit 81e3b4f

Please sign in to comment.