aboutsummaryrefslogtreecommitdiff
path: root/basic.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Try updated rule for "is new paragraph"Linus Torvalds2016-10-021-10/+14
| | | | | | | This makes non-alphabetic characters at the beginning be a mark of a paragraph. That's probably bogus, but let's try how it works. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* Make some minor code legibility changesLinus Torvalds2016-10-021-23/+24
| | | | | | | I'm going to play around with the whole "paragraph ends here" logic, but the way it used to be written made that hard. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* Fix 'getccol()' and 'getgoal()' functions for multibyte UTF-8 charactersLinus Torvalds2012-07-151-4/+10
| | | | | | | | | | | | | These functions convert the byte offset into the column number (getccol()) and vice versa (getgoal()). Getting this right means that moving up and down the text gets us the right columns, rather than moving randomly left and right when you move up and down. We also won't end up in the middle of a utf-8 character, because we're not just moving into some random byte offset, we're moving into a proper column. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* Make cursor movement (largely) understand UTF-8 character boundariesLinus Torvalds2012-07-101-5/+21
| | | | | | | | | | Ok, so it may do odd things if it's not truly utf-8, and when moving up and down lines that have utf-8 the cursor moves oddly (because the byte offset within the line stays constant, rather than the character offset), but with this you can actually open the UTF8 example file and move around it, and at least some of the movement makes sense. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* uemacs: Move structure line and its functions to its own header file.Thiago Farina2010-11-151-0/+2
| | | | | Signed-off-by: Thiago Farina <tfransosi@gmail.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* uemacs: Fix return statementsPekka Enberg2010-08-291-3/+3
| | | | | | | | Return statement is not a function so remove superfluous use of parenthesis. Cc: Thiago Farina <tfransosi@gmail.com> Signed-off-by: Pekka Enberg <penberg@kernel.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* uemacs: Make getgoal function private to basic.c.Thiago Farina2010-08-281-34/+34
| | | | | | | | This functions is only used internally by basic.c, so marking it static, to make it private. Signed-off-by: Thiago Farina <tfransosi@gmail.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* uemacs: basic.c: Add support to go to the end of the buffer.Thiago Farina2010-08-211-62/+63
| | | | | | | | | | | | | | | | There is a case when the user can type something like this: em filename + or even em + Instead of saying "Bogus argument" when the uemacs start, just go to the end of the buffer like we can do in vim for example. Signed-off-by: Thiago Farina <tfransosi@gmail.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* uemacs: convert typdef struct LINE to struct line.Thiago Farina2010-04-281-8/+8
| | | | | | Cc: Pekka Enberg <penberg@cs.helsinki.fi> Signed-off-by: Thiago Farina <tfransosi@gmail.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* uemacs: remove use of 'register' keywordPekka Enberg2010-02-271-14/+14
| | | | | | | | | | | | | Lets welcome uEmacs/PK to the year 2010! As expected, the patch has no effect on the generated code: text data bss dec hex filename 106002 8864 18616 133482 2096a em 106002 8864 18616 133482 2096a em.new Cc: Thiago Farina <tfransosi@gmail.com> Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* Fix up some trivial gcc -Wall warningsLinus Torvalds2005-09-301-4/+4
| | | | Lots more to go.
* Lots of ANSI'fication and cleanupsLinus Torvalds2005-09-301-0/+1
| | | | | | Still tons of warnings with "-Wall", but now it's actually getting closer. It even compiles again.
* First cut at turning things into proper modern ANSI CLinus Torvalds2005-09-301-34/+37
| | | | Hey! Real declarations!
* Run "indent -kr -i8" on the sourcesLinus Torvalds2005-09-301-183/+183
| | | | Let's see how nasty it is to clean things up. For real.
* Initial import of em-4.0.15-ltLinus Torvalds2005-05-311-0/+462
This is a slightly updated version of uemacs-PK (PK is Pekka Kutvonen) which was used at Helsinki University a long time ago. My fingers cannot be retrained.