branch: master
commit f565f76dfb3a31becc32c807916c011cde6c4e64
Author: Aaron Jensen <[email protected]>
Commit: Aaron Jensen <[email protected]>

    Limit rg results to 150 columns
    
    Emacs doesn't handle long line lengths very well. If you accidentally rg a 
file
    a file that has very long line lengths it can freeze emacs. This prevents rg
    from returning any results with more than 150 characters. Instead, it will
    indicate that there were results in that file but they were elided.
---
 counsel.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/counsel.el b/counsel.el
index ea66e5c..c2a5917 100644
--- a/counsel.el
+++ b/counsel.el
@@ -1836,7 +1836,7 @@ This uses `counsel-ag' with `counsel-pt-base-command' 
replacing
     (counsel-ag initial-input)))
 
 ;;** `counsel-rg'
-(defcustom counsel-rg-base-command "rg -i --no-heading --line-number %s ."
+(defcustom counsel-rg-base-command "rg -i --no-heading --line-number 
--max-columns 150 %s ."
   "Used to in place of `counsel-rg-base-command' to search with
 ripgrep using `counsel-rg'."
   :type 'string

Reply via email to