xmltools icon indicating copy to clipboard operation
xmltools copied to clipboard

Language Menu selection does not change.

Open boris-999 opened this issue 3 years ago • 5 comments

Installed latest 3.1.1.10 XML Tools, into latests Notepad++ 8.1.9.3 and it prevents changing the language menu.. eg. i load a XML file, and try to switch to something else, it doesn't change off the XML language menu setting.

see https://github.com/notepad-plus-plus/notepad-plus-plus/issues/10939 for details of proving this issue is in the XML Tools plugin.

boris-999 avatar Dec 24 '21 02:12 boris-999

In the XMLTools menu, please uncheck "Set XML type automatically" This option force XML language when xml is recognized.

morbac avatar Jan 02 '22 13:01 morbac

Seems like something that should occur when the file is opened, not break the ability to select another language. It's sounding like your saying any language that by chance has some XML, as trivial as it may be, will cause XML to be set and unresponsive to language changes. If my million likes of JS had a 20 character string in it that has some XML, teh document is XML?

boris-999 avatar Jan 03 '22 12:01 boris-999

Initially the automatic XML language switch was performed on document loading only. But some users requested that language change automatically when pasting xml code in a blank document or when typing xml from scratch. I'll look to add an option which permit to customize the behaviour of this feature.

Now just one precision. XMLTools set XML language when:

  1. option "Set XML type automatically" is set and
  2. if document content starts with "<?xml "

Therefore I'm surprised that XMLTools force XML language on javascript code containing some XML.

morbac avatar Jan 09 '22 10:01 morbac

I like the way the JSON viewer plugin handles it. It's not set automatically, but when you pretty-print, it gets set. And it would be nice to not need the <?xml tag, for when we're pasting things like SOAP envelopes (I know, I know...old stuff...).

mike-loux-planview avatar Feb 25 '22 17:02 mike-loux-planview

Auto setting language XML on pretty-print would be a fantastic enhancement!

PopeJareth avatar May 20 '22 19:05 PopeJareth