Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are
spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the
password reset link.
Due to spam on this forum, all posts now need moderator approval.
Entire forum
➜ MUSHclient
➜ Lua
➜ Display (Note()-esq) that ignores screenwrap?
Display (Note()-esq) that ignores screenwrap?
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| Dontarion
USA (62 posts) Bio
|
Date
| Tue 03 Nov 2009 02:22 AM (UTC) |
Message
| 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? | Top |
|
Posted by
| Blainer
(191 posts) 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
|
Message
| You could do this.
SetOption("wrap_column", 200)
Note("really long string")
SetOption("wrap_column", 85)
| Top |
|
Posted by
| Phaeton
Canada (8 posts) 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
|
Message
| 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
else
note "some stuff"
end
:) (heavy on the pseudo) | Top |
|
Posted by
| Nick Gammon
Australia (23,133 posts) Bio
Forum Administrator |
Date
| Reply #3 on Fri 06 Nov 2009 02:02 AM (UTC) |
Message
| 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 | Top |
|
Posted by
| Phaeton
Canada (8 posts) Bio
|
Date
| Reply #4 on Fri 06 Nov 2009 04:54 AM (UTC) |
Message
|
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 ;)) | 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.
17,221 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top