Duroktar / Wolf

Wolf is a VsCode extension that enables live inspection of Python code in the editor.
Other
129 stars 7 forks source link

truncation [enhancement] #23

Closed Almenon closed 6 years ago

Almenon commented 6 years ago

Wolf should truncate if the content is too long.

Shouldn't be too hard to fix ~ right before displaying the message you would do something like:

// get maxStringLength from settings. 
if(preview.length > maxStringLength){
  preview = preview.slice(0,maxStringLength) + "..."
}

The user could still hover over the preview to see the box with the full content

Reasoning; The user may read in a very large file and you dont want to spend a bunch of time writing the contents to the screen

Duroktar commented 6 years ago

Closed in v0.3.7! Set the cutoff point with the wolf.maxLineLength setting. Thanks again, cheers.