Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 54551

Summary: Improper autocmd in system vimrc
Product: [Retired] Red Hat Raw Hide Reporter: brian medley <bpmedley>
Component: vimAssignee: Bernhard Rosenkraenzer <bero>
Status: CLOSED RAWHIDE QA Contact: David Lawrence <dkl>
Severity: medium Docs Contact:
Priority: medium    
Version: 1.0   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
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: --- Target Upstream Version:
Embargoed:

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)