abe33 / atom-pigments

An Atom package to display colors in project and files.
MIT License
524 stars 68 forks source link

Uncaught Error: This buffer's content is too large to fit into a string.Consider using APIs lik... #412

Open YellowMart opened 5 years ago

YellowMart commented 5 years ago

[steps to reproduce:]

  1. Open a huge sql file
  2. delete a line
  3. Boom ! Error.

Atom: 1.31.2 x64 Electron: 2.0.7 OS: Mac OS X 10.13.6 Thrown From: pigments package 0.40.2

Stack Trace

Uncaught Error: This buffer's content is too large to fit into a string.

Consider using APIs like getTextInRange to access the data you need.

At /Applications/Atom.app/Contents/Resources/app/node_modules/text-buffer/lib/text-buffer.js:545

Error: This buffer's content is too large to fit into a string.

Consider using APIs like `getTextInRange` to access the data you need.
    at TextBuffer.module.exports.TextBuffer.getText (/Applications/Atom.app/Contents/Resources/app/node_modules/text-buffer/lib/text-buffer.js:545:94)
    at TextEditor.getText (/Applications/Atom.app/Contents/Resources/app/src/text-editor.js:1206:41)
    at ColorBuffer.module.exports.ColorBuffer.scanBufferForVariables (/packages/pigments/lib/color-buffer.coffee:224:23)
    at ColorBuffer.module.exports.ColorBuffer.update (/packages/pigments/lib/color-buffer.coffee:153:8)
    at /packages/pigments/lib/color-buffer.coffee:42:12

Commands

     -0:14.5.0 core:backspace (input.hidden-input)
     -0:11.2.0 core:move-down (input.hidden-input)
     -0:10.5.0 core:backspace (input.hidden-input)
     -0:07.7.0 core:save (input.hidden-input)

Non-Core Packages

php-twig 4.0.0 
pigments 0.40.2