Multiline bug?

Bike version: 1.18.3 (178)

There is a bug when creating multiline using control + option

  1. When I hit control option line position here:

  2. When I start writing, it skips a line and starts writing on the next line:

Multiline

Remember that Bike is a deep, or complete, outliner – it doesn’t make the (OmniOutliner etc) distinction between rows/topics which can be outlined and “attached note text” in which outlining is not possible.

Instead:

  1. all rows of text have an independent position in an outline,
  2. All rows have a type. The default type is body, but you can also choose from
  • heading
  • quote
  • code
  • note
  • task
  • ordered
  • unordered

Below, for example, you see a heading, two ordered rows, and, indented under the first ordered row, a couple of body rows, one already containing text, and one still empty.

In other words, to flesh out a topic line with detail, you don’t insert a split, attempting to create multiple split “lines” which are beyond the reach of outline functions like expand-collapse, focus, outline-move etc.

Instead, you create new, separate indented child rows of various types, with all the power of full outlining.

See: Row Types | Bike

At the end of an ordered row, under which you which to have further lines without an ordinal prefix:

  1. :leftwards_arrow_with_hook: (return) to create a new row,
  2. tab to indent it as a child row, and
  3. convert it to a body row (or note row if you prefer).

I can confirm this: pressing CTRL+OPT+Return at the end of a row will make a line break but will not move the cursor into the next line of the same row until you start typing. That’s likely why there’s a double line break in the OP’s example.

When you press Control-Option-Return the macOS text system inserts a carriage return character \r instead of a newline \n.

When Bike sees a newline it will create a new row that Bike can recognize. One the other handle when you insert a \r, Bike has no special handling. A new row is not created, Bike just inserts into the existing row… but the underlying text layout system that Bike uses does break the visual line for that character.

Bike can generally handle this, but I don’t really recommend using it. As @complexpoint says generally Bike isn’t intended to work this way and you can’t take advantage of most of the features that Bike provides when you use \r formatting.

With all that said there does appear to be a bug. I would expect \r to always create a visual break, even when inserted at the end of a line. I’ll see if I can figure out what’s going on with that.

1 Like

Ok, I figured out buggy behavior, and actually you can reproduce same issue in TextEdit like this:

  1. Enter two lines of text
  2. Place your cursor at the end of the first line
  3. Use Control-Option-Return to insert a carriage return

You’ll see a lot of the same weird behavior. What’s happening is that every Bike line ends with a \n. If you insert a \r right before it those two characters are combined to create just a single visual line break. On the other hand if you insert another character between those two then you’ll get two visual line breaks.

I’ve added a possible fix to Bike 2 codebase… when preparing a line if it ends with \r I will append \r\n instead of just \n. I think I’m going to leave as is in Bike 1 codebase, because I think I make assumptions throughout the code that I have alway just appended a single \n to user entered text.

1 Like

I remember one or two users early on in the Bike 1 release diving into it with assumptions formed by using various shallower outliners which attach flat non-outlineable “note text” to outlineable “topics”.

Perhaps worth a doc page somewhere showing, for example, the typing of non-numbered (body or note) child rows under ordered (i.e. numbered) parent rows ?

(Seems like a fairly classic context in which the multiline or note question arises)

If it flat out didn’t work I wouldn’t mind at all as I understand there may be a limit to / or an intended restriction to how the app behaves. But I found out that I can make it work but still has this weird issue so I have reported. Anyway, thanks for the info :smiley:

1 Like