zed icon indicating copy to clipboard operation
zed copied to clipboard

saving the file replicates commented line

Open verniegithub opened this issue 7 months ago • 0 comments

Summary

zed replicates a commented line every time saving the file.

$value) { // Check if the current entry matches $coinpin if ($value == $coinpin) { // If match found, add the selected attribute echo ""; } else { // If no match, print the option without the selected attribute echo ""; } } ?>

Steps to reproduce:

  1. Place the above code in zed and save it to a file.
  2. Edit at the bottom part like adding after the last curly bracket.
  3. Save the file using ctrl+s. The line "//Iterate over each entry in the array" at the top will replicate itself.
  4. Edit again and save, you will see another line replicated.

Expected Behavior: no replication of the above commented line. Actual Behavior: Editing then saving the file creates another line below of the commented line.

https://github.com/user-attachments/assets/b3bb2050-91e8-4c59-886b-fb2dc0f21ced

Zed Version and System Specs

zed version 0.185.16 05/12/2025 Linuxmint Linux box 6.8.0-59-generic #61-Ubuntu SMP PREEMPT_DYNAMIC Fri Apr 11 23:16:11 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux

verniegithub avatar May 14 '25 04:05 verniegithub