]> code.delx.au - gnu-emacs-elpa/commitdiff
company-grab-line: Make it work in ERC prompt
authorDmitry Gutov <dgutov@yandex.ru>
Wed, 9 Mar 2016 03:14:57 +0000 (05:14 +0200)
committerDmitry Gutov <dgutov@yandex.ru>
Wed, 9 Mar 2016 03:14:57 +0000 (05:14 +0200)
http://debbugs.gnu.org/cgi/bugreport.cgi?bug=22953

company.el

index 20aedc8342c5f2f7ce6f1db1d7903418ab8be43f..2667b514343318005030908312ea000b32f8631e 100644 (file)
@@ -833,7 +833,8 @@ means that `company-mode' is always turned on except in `message-mode' buffers."
 If EXPRESSION is non-nil, return the match string for the respective
 parenthesized expression in REGEXP.
 Matching is limited to the current line."
-  (company-grab regexp expression (point-at-bol)))
+  (let ((inhibit-field-text-motion t))
+    (company-grab regexp expression (point-at-bol))))
 
 (defun company-grab-symbol ()
   "If point is at the end of a symbol, return it.