Skip to content

io.input().remaining() acting weirdly #10

@vifino

Description

@vifino
while true do
  print("pre-read", io.input().remaining())
  print(io.read(1))
  print("post-read", io.input().remaining())
  os.sleep(1)
end

Results in https://puu.sh/vItFy.png when typing. Really weird stuff.

Magik6k | vifino, idk, it might be returning number of buffers in pipe waiting for read instead of len. Will look into when I'll have some time for mc. Can you make an issue in plan9k repo?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions