Bug 54551 - Improper autocmd in system vimrc
Summary: Improper autocmd in system vimrc
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Raw Hide
Classification: Retired
Component: vim   
(Show other bugs)
Version: 1.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Bernhard Rosenkraenzer
QA Contact: David Lawrence
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2001-10-12 02:34 UTC by brian medley
Modified: 2007-04-18 16:37 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2001-10-12 02:43:03 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

Description brian medley 2001-10-12 02:34:34 UTC
From Bugzilla Helper:
User-Agent: Mozilla/4.7 [en] (Win98; U)

Description of problem:
This system vimrc has a subtle bug.  It has to do with this line:
  " When editing a file, always jump to the last cursor position
  autocmd BufReadPost * if line("'\"") | exe "'\"" | endif

It should be:
  " When editing a file, always jump to the last cursor position
  autocmd BufReadPost *
    \ if line("'\"") > 0 && line("'\"") <= line("$") |
    \   exe "normal g`\"" |
    \ endif

The original will give seemingly random error messages.

Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
step 1
- vim a (where 'a' is a new file)
- make it look like this:
    1
    2
    3
- :3
- :wq
 
step 2
- gvim a
- :3normal dd
- :w
- :bd (note, *don't* exit this gvim)
 
step 3
- vim a (shows error)

Actual Results:  An error from vim.

Expected Results:  No error.

Additional info:

Comment 1 brian medley 2001-10-12 02:42:59 UTC
I forgot to specify.  This is with the following packages installed (from
ftp.rawhide.com):

vim-enhanced-6.0-2
vim-common-6.0-2
vim-minimal-6.0-2
vim-X11-6.0-2

Comment 2 Bernhard Rosenkraenzer 2001-10-23 14:34:36 UTC
Thanks, changed. (6.0-3)



Note You need to log in before you can comment on or make changes to this bug.