Fix is in attachment. Basically we sometimes did leftOnEol where we
shouldn't have.
Cheers,
-- 
Krzysiek

--~--~---------~--~----~------------~-------~--~----~
Yi development mailing list
[email protected]
http://groups.google.com/group/yi-devel
-~----------~----~----~----~------~----~------~--~---

Thu Dec  4 18:21:08 CET 2008  Krzysztof Goj <[EMAIL PROTECTED]>
  * c$ and C doesn't move to left any more

New patches:

[c$ and C doesn't move to left any more
Krzysztof Goj <[EMAIL PROTECTED]>**20081204172108] hunk ./Yi/Keymap/Vim.hs 320
         cnt <- count
         let i = maybe 1 id cnt
         choice $
-          [c ?>>! action i | (c,action) <- singleCmdFM ] ++
+          [c ?>>! eolAware $ action i | (c,action) <- singleCmdFM ] ++
           [events evs >>! action i | (evs, action) <- multiCmdFM ] ++
           [events evs >>! action cnt | (evs, action) <- zScrollCmdFM ] ++
           [char 'r' ?>> textChar >>= write . savingPointB . writeN . replicate 
i
hunk ./Yi/Keymap/Vim.hs 326
           ,pString "gt" >>! nextTabE
           ,pString "gT" >>! previousTabE]
-
+            where eolAware :: YiM () -> YiM ()
+                  eolAware cmd = cmd >> (withEditor $ withBuffer0 leftOnEol)
 
      -- TODO: add word bounds: search for \<word\>
      searchCurrentWord :: Direction -> EditorM ()
hunk ./Yi/Keymap/Vim.hs 496
      cmd_op = do
        cnt <- count
        let i = maybe 1 id cnt
-       choice $ [let onMove regionStyle move =
-                        onRegion regionStyle =<< withBuffer0 (regionOfViMove 
move regionStyle)
+       choice $ [let onMove regionStyle move = do
+                        region <- withBuffer0 (regionOfViMove move regionStyle)
+                        onRegion regionStyle region
+                        withBuffer0 $ leftOnEol
+                        return region
                      s1 = prefix [c]
                      ss = nub [[c], s1]
                  in
hunk ./Yi/Keymap/Vim.hs 595
      cut regionStyle move = do
          region <- withBuffer0 $ regionOfViMove move regionStyle
          cutRegion regionStyle region
-         withBuffer0 leftOnEol
 
      cutSelection :: EditorM ()
      cutSelection = uncurry cutRegion =<< withBuffer0 regionOfSelection

Context:

[Vim: N% move now go to first non space.
Nicolas Pouillard <[EMAIL PROTECTED]>**20081204104245
 Ignore-this: 49b00315b215893831191932a388daaf
] 
[cabal lexer: follow more closely the actual Cabal tool
Nicolas Pouillard <[EMAIL PROTECTED]>**20081204103504
 Ignore-this: 668b9a8f6589e0dbad8c52f519d239a5
 
 In particular concerning comments.
] 
[remove a bad usage of List.head
[EMAIL PROTECTED] 
[Yi.IReader: more comments
[EMAIL PROTECTED]
 Ignore-this: c413390c7fd7ae85f76734fa3c5a8b54
] 
[Yi/Users/Corey: Replaced hardcoded 4 in KBS handling to be shift width.
[EMAIL PROTECTED] 
[Yi.Users.Corey: minor suggestions
Nicolas Pouillard <[EMAIL PROTECTED]>**20081203214045
 Ignore-this: c7357f691ea18c8a89db9b3e7293b762
] 
[More scrolling
Krzysztof Goj <[EMAIL PROTECTED]>**20081204025147
   Normal mode: zz zt zb z. z+ z-
   Insert mode: ^y ^e
] 
[Vim: less parens.
Nicolas Pouillard <[EMAIL PROTECTED]>**20081203214311
 Ignore-this: 22702b54973afdb5c77d67929452a695
] 
[Vim: ":<int>" also have to go to first non space char.
Nicolas Pouillard <[EMAIL PROTECTED]>**20081203213806
 Ignore-this: 69ee440d16448b21851ddbc06352b37f
] 
[Vim: improve 'G' code.
Nicolas Pouillard <[EMAIL PROTECTED]>**20081203213640
 Ignore-this: 8cbd5f1a5c13ca99bc7dc0404563a147
] 
[Main.hs: M-x ireadMode to just iread
[EMAIL PROTECTED]
 Ignore-this: b307ff52b630f8500f05218d4a5aa5c0
 So I don't need to constantly disambiguate.
] 
[last of the LANGUAGE pragmas
[EMAIL PROTECTED]
 Ignore-this: 8a1bd56c03682e4c9b163a615263af84
 I have cast the extensions field into perdition, and added the missing 
per-file declarations.
] 
[Shim/*: +pragmas, rm unused imports
[EMAIL PROTECTED]
 Ignore-this: eff16eba16ed8e3b98fdfe9420f1ab2b
] 
[fix up Shim/ w/r/t Control.Exception
[EMAIL PROTECTED]
 Ignore-this: 4ec9ae4bafcf9b98c07acd0a6cbab9e
] 
[Shim/; some -Wall cleanup
[EMAIL PROTECTED]
 Ignore-this: bcfe4c1e2d239472e56d08fe0eee0bd4
] 
['gg' and 'G' should go to first non-space char of line
Krzysztof Goj <[EMAIL PROTECTED]>**20081203212353] 
[Vim normal mode: "gg" with count argument
Krzysztof Goj <[EMAIL PROTECTED]>**20081203203817] 
[Add Yi.Region.regionIsEmpty
Nicolas Pouillard <[EMAIL PROTECTED]>**20081203175753
 Ignore-this: c075fd46a14a991d5476770b9faafed7
] 
[Vim: do nothing when cuting/pasting empty regions
Nicolas Pouillard <[EMAIL PROTECTED]>**20081203155544
 Ignore-this: e0b4bc63452e1e2df93b4e3a2a841413
 
 This avoid marking the buffer as unsaved.
] 
[Vim: style, parens, and trailing white-spaces.
Nicolas Pouillard <[EMAIL PROTECTED]>**20081203155350
 Ignore-this: 3d959998aed83292f5fac99a7a8d6f44
] 
[Vim: when leaving insert/replace mode, use moveXorSol 1 instead of leftB
Nicolas Pouillard <[EMAIL PROTECTED]>**20081203155247
 Ignore-this: f2766bc3a75501484a524d241f84e025
] 
[Comments fix
Krzysztof Goj <[EMAIL PROTECTED]>**20081203155512
 - Esc leaves visual mode -- dropping comment
 - Explain and extend a FIXME for S and C
] 
[Behaviour at end of line (BIG PATCH)
Krzysztof Goj <[EMAIL PROTECTED]>**20081203031045
  - Doesn't allow to go to EOL in normal mode
  - Does allow it in other (visual, insert, replace) modes
  - Corrected D, and '$' command
  - cursor moves left after leaving insert and replace mode
 
] 
[Corrected 'x' and 'X' behaviour
Krzysztof Goj <[EMAIL PROTECTED]>**20081203125741
 Now 'x' and 'X' are aliases to dl and dh (as in Vim) -- they cannot delete 
newline character.
] 
[Ctrl+h in insert and replace mode; Ctrl+w in replace mode
Krzysztof Goj <[EMAIL PROTECTED]>**20081203012614] 
[Ctrl+h in Ex mode
Krzysztof Goj <[EMAIL PROTECTED]>**20081203000017] 
[Ctrl+p, Ctrl+n in Ex mode
Krzysztof Goj <[EMAIL PROTECTED]>**20081202235807] 
[Vim visual mode: 's' is synonym to 'c'
Krzysztof Goj <[EMAIL PROTECTED]>**20081202233509] 
[Vim: ctrl+u, ctrl+d scrolling
Krzysztof Goj <[EMAIL PROTECTED]>**20081202231544] 
[Ctrl-t and Ctrl-d in insert mode (indentation)
Krzysztof Goj <[EMAIL PROTECTED]>**20081202223751] 
[Fixed isMakefile: takeBaseName should be takeFileName. Otherwise makefile's 
named like foo.mk would not be recognized.
[EMAIL PROTECTED] 
[Issue 202: indentation and Vim commands
Krzysztof Goj <[EMAIL PROTECTED]>**20081202183446
 Added indentation-awareness to cutRegion, pasteBefore and pasteAfter.
] 
[Better percent move.
Krzysztof Goj <[EMAIL PROTECTED]>**20081202162105] 
[replace all: more helpful message
[EMAIL PROTECTED] 
[fix build
[EMAIL PROTECTED] 
[Better word and WORD motions for Vim keymap.
Krzysztof Goj <[EMAIL PROTECTED]>**20081202132813] 
[doc
[EMAIL PROTECTED] 
[Yi/Users/Gwern.hs: +shorter binding for gotoLn
[EMAIL PROTECTED]
 Ignore-this: 5defc56344c3e1c61bd602d192e06af3
 I find the default Emacs binding of M-g g tedious; why not just M-g?
] 
[doc
[EMAIL PROTECTED] 
[make Accessor instance of Category
[EMAIL PROTECTED] 
[use Control.Category
[EMAIL PROTECTED] 
[Yi.Keymap.Emacs: +standard emacs M-; binding
[EMAIL PROTECTED]
 Ignore-this: 5abf2d7154acfdcce44286f34ec238b9
] 
[update to base>=4; replace all Control.Exception with Control.OldException
[EMAIL PROTECTED]
 Ignore-this: 205b7c23a4ffcc16b8612d0b4edc9352
] 
[better support for vivid colors
[EMAIL PROTECTED] 
[Main.hs: minor indent
[EMAIL PROTECTED]
 Ignore-this: b53fd55beb556c92b6bba9ee4a49cd61
] 
[added C-w and C-u to ex mode
Aleksandar Dimitrov <[EMAIL PROTECTED]>**20081201103414] 
['ZZ' closes window, not editor, 'ZQ' == ':q!'
Aleksandar Dimitrov <[EMAIL PROTECTED]>**20081201103311] 
[bump version number
[EMAIL PROTECTED] 
[TAG 0.5.2
[EMAIL PROTECTED] 
Patch bundle hash:
1a56d2eddd29bb24252ea40ac97a149970bfb3e5

Reply via email to