Ticket #2853 (closed defect: fixed)
mc-4.8.4 - mcedit no longer remembers line number the user left the previous edit
Reported by: | Polynomial-C | Owned by: | andrew_b |
---|---|---|---|
Priority: | minor | Milestone: | 4.8.5 |
Component: | mc-core | Version: | 4.8.4 |
Keywords: | Cc: | smirta@… | |
Blocked By: | Blocking: | ||
Branch state: | merged | Votes for changeset: | committed-master |
Description
mcedit from mc-4.8.4 no longer remembers the line a user was in the last edit.
Steps to reproduce:
1.) # mcedit /etc/passwd
2.) move cursor to line 20
3.) exit mcedit
4.) # mcedit /etc/passwd
given result:
cursor in mcedit is in line 1
expected result:
cursor in mcedit is in line 20 as in previous versions
# mc -V GNU Midnight Commander 4.8.4 Built with GLib 2.32.4 Using the S-Lang library with terminfo database With builtin Editor With subshell support as default With support for background operations With mouse support on xterm With internationalization support With multiple codepages support Virtual File Systems: cpiofs, tarfs, sfs, extfs, ext2undelfs, ftpfs, fish Data types: char: 8; int: 32; long: 64; void *: 64; size_t: 64; off_t: 64;
Change History
comment:2 Changed 12 years ago by Polynomial-C
"Save file position" is checked. The permissions of ~/.mc/filepos are good as well. But I am using --with-homedir=.mc when compiling mc. Does that make any difference?
# mc -F Root directory: /root [System data] Config directory: /etc/mc/ Data directory: /usr/share/mc/ VFS plugins and scripts: /usr/libexec/mc/ extfs.d: /usr/libexec/mc/extfs.d/ fish: /usr/libexec/mc/fish/ [User data] Config directory: /root/.mc/ Data directory: /root/.mc/ skins: /root/.mc/skins/ extfs.d: /root/.mc/extfs.d/ fish: /root/.mc/fish/ mcedit macros: /root/.mc/mc.macros mcedit external macros: /root/.mc/mcedit/macros.d/macro.* Cache directory: /root/.mc/
comment:3 Changed 12 years ago by andrew_b
- Owner set to andrew_b
- Status changed from new to accepted
- Component changed from mcedit to mc-core
- Milestone changed from Future Releases to 4.8.5
Аh, indeed. Standalone mcedit doesn't use saved file position.
comment:4 Changed 12 years ago by andrew_b
- Branch state changed from no branch to on review
Branch: 2853_mcedit_filepos (parent: master).
changeset:972beef6ea2392ab30d755e3421b3dd0b4e2a3df
comment:5 Changed 12 years ago by Polynomial-C
Yes, that patch fixes the problem. Thank you very much :)
comment:7 Changed 12 years ago by angel_il
- Votes for changeset changed from slavazanko to slavazanko angel_il
- Branch state changed from on review to approved
comment:8 Changed 12 years ago by andrew_b
- Status changed from accepted to testing
- Votes for changeset changed from slavazanko angel_il to committed-master
- Resolution set to fixed
- Branch state changed from approved to merged
Merged to master: [e39c697df47fe1beb727e0cb890a4c27c22cef09].
comment:10 follow-up: ↓ 11 Changed 11 years ago by Saha
- Status changed from closed to reopened
- Cc smirta@… added
- Summary changed from mc-4.8.4 - mcedit no longer remembers line number the user left the previous edit to mc-4.8.11 - mcedit no longer remembers line number the user left the previous edit
- Version changed from 4.8.4 to 4.8.11
- Milestone 4.8.5 deleted
- Resolution fixed deleted
Problem is reappeared in 4.8.11 (and in 4.8.9 also). But now file position is not remembered neither in standalone mcedit nor in editing (and viewing) from mc.
"Save file position" option is checked and permissions of ~/.local/share/mc/filepos is 664 (belongs to user).
P.S. Tested on fresh mc-4.8.11 installation from sources with default flags.
P.P.S. ~/.local/share/mc/filepos is created (if it is absent) with permissions 640 but it is empty.
comment:11 in reply to: ↑ 10 Changed 11 years ago by andrew_b
Replying to Saha:
P.S. Tested on fresh mc-4.8.11 installation from sources with default flags.
P.P.S. ~/.local/share/mc/filepos is created (if it is absent) with permissions 640 but it is empty.
Unreproducable for me. Everything works fine.
comment:12 Changed 11 years ago by Saha
I am sorry: the problem is appeared only on GlusterFS file system (mounted through Fuse).
I will check more accurately the origin of the problem...
comment:13 follow-up: ↓ 14 Changed 11 years ago by Saha
I am really sorry: it seems to be a problem with file system. Please close this bug
comment:14 in reply to: ↑ 13 Changed 11 years ago by andrew_b
- Status changed from reopened to closed
- Resolution set to fixed
Ok.
Closed with restored status, milestone and resolution.
comment:15 Changed 11 years ago by andrew_b
- Milestone set to 4.7.5
- Version changed from 4.8.11 to 4.8.4
- Summary changed from mc-4.8.11 - mcedit no longer remembers line number the user left the previous edit to mc-4.8.4 - mcedit no longer remembers line number the user left the previous edit
Works fine for me.
Please check [x] Save file position option and permissions of ~/.local/share/mc/filepos.