quintanar401 / connect-kdb-q

Query execution support for KDB-Q in Atom
MIT License
7 stars 5 forks source link

Query Results is wrapping long lines on Atom 1.15.0 #8

Closed EdrinP closed 6 years ago

EdrinP commented 7 years ago

I have 'showWidth' config set pretty high (2000) for conveniently scrolling through wide tables. It appears that with today's 1.15.0 update, long lines are wrapping around to multiple lines in Query Results.

Can we bring back old behavior of one line per table row in Query Results (aka, disable wrapping)? If not, perhaps line wrapping can be made into a config option?

quintanar401 commented 7 years ago

I can't reproduce it. Maybe you accidentally clicked View->Toggle Soft Wrap? Try to turn it off. Also the same setting can be found in language-q package. Or you can put it in your config under

'.source.q':
  'editor':
EdrinP commented 7 years ago

Hi. Pretty sure it's due to this, mentioned in 1.15.0 rel notes: https://github.com/atom/atom/pull/13820 Here's one example of how to opt-out of this in a grammar: https://github.com/atom/language-gfm/pull/187/files I suppose I can override this in my config, unless you want to consider adding to language-q Thanks!

quintanar401 commented 7 years ago

Unfortunately this option is not implemented. Atom code still has this constant hardcoded, nothing can be done. Maybe it will be added in the next release...

quintanar401 commented 7 years ago

Still there ....

  getSoftWrapColumn: ->
    if @isSoftWrapped()
      if @softWrapAtPreferredLineLength
        Math.min(@getEditorWidthInChars(), @preferredLineLength)
      else
        @getEditorWidthInChars()
    else
MAX_SCREEN_LINE_LENGTH
ineedasername commented 7 years ago

This pretty frustrating. I was hoping to switch to Atom, and ran headlong into this. Finding out it's due to an otherwise undocumented hard-coded value is very frustrating. Finding out further that no corresponding updates to UI configs to mention this, or raise an alert to the user when user-supplied values cannot be honored is even more so. I understand limitations, but undocumented & contradictory (UI says one thing, performs differently) is untenable as a design process in an application I'll spend hours a day with.

quintanar401 commented 7 years ago

If you mean the package settings then there is no contradiction - width setting controls how much of the Q value is processed (similar to show in Q) not the max length of the atom line.

quintanar401 commented 7 years ago

Btw, there seams to be a workaround - I can redefine this function in this particular editor to return say 2000. If you still need it I may try to add it.

EdrinP commented 6 years ago

This was fixed in 1.22 See: https://github.com/atom/atom/pull/14495 Under File->Settings->Editor, I set Max Screen Line Length to 20,000 which is enough to avoid wrapping in most of my wide KDB tables.

Feel free to close this issue.