deadpixi / sam

An updated version of the sam text editor.
Other
436 stars 47 forks source link

Bug: "X w" doesn't work as expected #105

Open aksr opened 4 years ago

aksr commented 4 years ago
  1. Open sam.
  2. Create (one or) two files via new from the RMB-menu.
  3. Give them names via f command, for example: f 1 f 2. (names should be only one letter or number)
  4. Execute X w.

After step 4., you'll get: ?no file name.

(p9p's sam works fine.)

Edit: It seems it is the name where the problem lies, names should be only one letter or number (e.g. f 1, f 2, f a...)

ckeen commented 4 years ago

Thanks for your report!

I am using an older version of sam here and cannot reproduce the issue, which version are you using? I would then try to bisect from my version to yours to narrow down the issue.

Thanks!

Christian

-- May you be peaceful, may you live in safety, may you be free from suffering, and may you live with ease.

aksr commented 4 years ago

@ckeen: Latest (5893679).

ckeen commented 4 years ago

Hm, strange, I cannot reproduce the issue with the latest either. Which OS is this?

-- May you be peaceful, may you live in safety, may you be free from suffering, and may you live with ease.

aksr commented 4 years ago

@ckeen: You're forgeting something, execute the steps carefully. (OS: Arch Linux)

Edit: It seems it is the name where the problem lies, the name should be only one letter or number, (e.g. f 1, f 2, f a...)!

aksr commented 4 years ago

@ckeen: Try it with this new info. (I'm writing a new comment since I'm not sure if you saw the last one (after I edited it), since you're responding via email.)

aksr commented 4 years ago

In the file sam.c, function getname (line: 535), I changed return genstr.n-1 to return genstr.n, and it seems to work now. Not sure if anything else is broken, though.

I'll investigate further.

ckeen commented 4 years ago

Ah I see now, and you have figured it out too... I typed two letters by accident...

-- May you be peaceful, may you live in safety, may you be free from suffering, and may you live with ease.