[Home] [Downloads] [Search] [Help/forum]

Gammon Forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  Lua
. . -> [Subject]  Display (Note()-esq) that ignores screenwrap?
Home  |  Users  |  Search  |  FAQ
Register forum user name
Forgotten password?

Display (Note()-esq) that ignores screenwrap?

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page

Posted by Dontarion   USA  (62 posts)  [Biography] bio
Date Tue 03 Nov 2009 02:22 AM (UTC)
I'm trying to code something that will either ignore the screen wrap (not at full width) or a method of changing screen wrap width via commands. I haven't found either of these currently.

Scenario: Screen wrap width is set to 85 characters. It wraps normally. I want a line to display 200 characters without wrapping. My screen can easily handle this width. Is it possible to do so without affecting the other lines?
[Go to top] top

Posted by Blainer   (191 posts)  [Biography] bio
Date Reply #1 on Tue 03 Nov 2009 02:47 AM (UTC)

Amended on Tue 03 Nov 2009 02:48 AM (UTC) by Blainer

You could do this.
SetOption("wrap_column", 200)
Note("really long string")
SetOption("wrap_column", 85)

[Go to top] top

Posted by Phaeton   Canada  (8 posts)  [Biography] bio
Date Reply #2 on Thu 05 Nov 2009 09:33 PM (UTC)

Amended on Thu 05 Nov 2009 09:35 PM (UTC) by Phaeton

It'd probably be better to use SetOption with wrap, rather than wrap_column, since you wouldn't need to hard code your wrap values into your plugin/script/etc.

pseudo code go

if wrap = 1
   set wrap = 0
   note "some stuff"
   set wrap = 1
   note "some stuff"

:) (heavy on the pseudo)
[Go to top] top

Posted by Nick Gammon   Australia  (21,558 posts)  [Biography] bio   Forum Administrator
Date Reply #3 on Fri 06 Nov 2009 02:02 AM (UTC)
I was going to suggest that, but the wrap option doesn't stop wrapping exactly, it stops wrapping at the nearest space. So with wrap off, it truncates at column 80 (or whatever column you have set), but with wrap on, it truncates at the first space before the designated column, which looks better because words don't break in two. Basically this is because the client needs to allocate memory for the line when it starts, so it needs a wrap column figure.

I think the highest value is 500, so you could make it 500 if you want to sort-of stop wrapping.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Phaeton   Canada  (8 posts)  [Biography] bio
Date Reply #4 on Fri 06 Nov 2009 04:54 AM (UTC)

That actually explains a lot. In the past I've been extremely annoyed with the behavior of that option but I never really dedicated any time to figuring out why it wasn't working the way I'd expected it to. You should change the wording (or better yet, make it do what it seems like it should do, or both, or nothing ;))
[Go to top] top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page

Go to topic:           Search the forum

[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at FutureQuest]