CobbCoding1 / Cano

Text Editor Written In C Using ncurses
Apache License 2.0
73 stars 14 forks source link

added a color pallet feature #20

Closed MohammedAlAkashi closed 8 months ago

MohammedAlAkashi commented 8 months ago

file "colors" can be used to change the color scheme of the text editor, however you need to restart the editor for it to take place. i plan on adding the feature as a comman as well.

Please optimize if needed. currently works fine but im not sure how it will act when you enable the code style for C.

I tested the program though, it works fine and does change the color accordingly, comes with a default case if they mistyped or picked a color which does not exist.

CobbCoding1 commented 8 months ago

Hey, thanks for the pull request! The code looks mostly fine from what I can see, the only thing is you generally want to avoid strcmp and would rather use strncmp, especially since you know the size of what you're comparing. However, the reason I am not going to accept is because it would be removed almost immediately after. You see, the plan I had was to make a syntax file, which loads similar to the config file, and allows the user to choose colors there, and then they could use any RGB values they like. So, while this feature would be nice now, it would become outdated very quickly. Still though, great work!