Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃悶 .h extension as a default when saving files #816

Open
ahmdyasser opened this issue Oct 9, 2022 · 3 comments
Open

馃悶 .h extension as a default when saving files #816

ahmdyasser opened this issue Oct 9, 2022 · 3 comments
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@ahmdyasser
Copy link
Contributor

ahmdyasser commented Oct 9, 2022

Description

When I try to rename the file from Untitled to something like main.swift, it generates a header file named main.swift.h

To Reproduce

  1. Create an empty file
  2. Click on file name
  3. Rename it something like main.swift or main.cpp etc etc ..
  4. Click enter or save

Expected behavior

To generate a file with the extension entered.

Version information

CodeEdit: [e.g. 1.0]
macOS: [e.g. 12.3.0]
Xcode: [e.g. 13.3]

Additional context

image

@ahmdyasser ahmdyasser added the bug Something isn't working label Oct 9, 2022
@ahmdyasser ahmdyasser changed the title 馃悶 .h extension as a default when saving 馃悶 .h extension as a default when saving files Oct 9, 2022
@0xWDG
Copy link
Collaborator

0xWDG commented Oct 31, 2022

Was your last opened file a .h file? normally it uses the extension of the last opened file.

@lucek8123
Copy link

lucek8123 commented Dec 16, 2022

Hello, I found out why this is happening. It uses the ".h" extension when the file is first opened, but when the extension is changed, it uses that extension. CodeEdit enforces this extension resulting in extensions like '.py.h' or '.swift.py'. This is clearly visible in the video I recorded.

Edit: updated from iCloud link to google photos link (I think that will work this time)

@austincondiff
Copy link
Collaborator

Great find @lucek8123! We need to add logic to not enforce the extension when changing the extension to something other than what it currently is. Would you be able to take this on?

@austincondiff austincondiff added the good first issue Good for newcomers label Dec 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

4 participants