adobe / brackets

An open source code editor for the web, written in JavaScript, HTML and CSS.
http://brackets.io
MIT License
33.26k stars 7.64k forks source link

code folding state lost when cutting and pasting folded code #13014

Open danyn opened 7 years ago

danyn commented 7 years ago

Description

code folding state does not maintain when pasting code that has been folded.

Steps to Reproduce

  1. fold the elements to be copied
  2. copy then to the clipboard
  3. paste them in desired location

Expected behavior: Expected the code to remain folded

Actual behavior: The code expands upon being pasted

Versions

Windows 10 Pro on intel core i5 M20 Release 1.8 build 1.8.0-17108 (alf_localization_release_1.8 3af64fae4) build timestamp: Wed Nov 02 2016 12:07:29 GMT+0000

TimBibb commented 6 years ago

Yup, that's still happening with me as well. It's happening on most languages that I have tested. I'm going to look for the issue and try to fix it.

EDIT: Ok, so I found where the problem is. It's in the Brackets.js file, but the thirdparty CodeMirror/addon/fold/xml-fold file is where the code problem actually is. I'm not sure how to edit that, but I think I can add some code into the Brackets.js file to overwrite it. I'm going to figure it out.

EDIT 2: Just kidding, it is in a pre-installed extension. It seems that I need to submit a pull request to the developer who made the code to do this. (https://github.com/thehogfather/brackets-code-folding)