How did you open this? Maybe something overrode your default text editor application (look in settings for Default Applications).
Also maybe check your EDITOR env variable (echo $EDITOR), though that is only used when a different CLI program wants to open an editor for you (in CLI)Another commenter said less and it’s actually less doing this, it come with man package and set itself as default editor for PKGBUILD
I could be mistaken, but that editor looks like nano, which is just a super simple text editor. Ctrl-x should bring quit the editor and ask if you want to save.
How were you editing PKGBUILD files before? A GUI based editor?
It could be nano but I had to press Q to exit which is not nano key binding (Ctrl + X), I never edit PKGBUILD in terminal before, I’ll edit it in Kate if I had to