]> git.lizzy.rs Git - micro.git/log
micro.git
2 years agoRaku syntax: Fix strings and comments (#2311)
Juan Francisco Cantero Hurtado [Fri, 31 Dec 2021 22:42:21 +0000 (23:42 +0100)]
Raku syntax: Fix strings and comments (#2311)

* Raku syntax: Fix strings and comments

Problematic code:
my @array1 = [
   "'", "a", "b"
];
my @array2 = [
   '"', 'a', 'b'
];
my @array3 = [
   "#", "a", "b"
];

I deleted "default" because it was breaking comments with urls after
of my changes.

Some parts were taken from:
https://github.com/hankache/raku.nanorc/blob/master/raku.nanorc

* Raku syntax: fix strings

Code:
sub xyz(Str is encoded('utf8')) returns int32 is native('asdf') { * }
sub xyz(Str is encoded("utf8")) returns int32 is native("asdf") { * }

From python3.yaml

2 years agoFix repo.json info in plugin docs (#2313)
Reilly Wood [Fri, 31 Dec 2021 07:06:53 +0000 (02:06 -0500)]
Fix repo.json info in plugin docs (#2313)

2 years agoAdjust default keybinding text (#2293)
Owen Valentine [Sat, 25 Dec 2021 03:32:15 +0000 (05:32 +0200)]
Adjust default keybinding text (#2293)

Fixes #2287

2 years agoFix the syntax for Raku variables. (#2309)
Juan Francisco Cantero Hurtado [Wed, 22 Dec 2021 04:47:31 +0000 (05:47 +0100)]
Fix the syntax for Raku variables. (#2309)

The current version has problems with the last argument and the
brackets in this code:

sub myfunction(Int $x1, Int $x2){

}

Taken from:
https://github.com/hankache/raku.nanorc/blob/master/raku.nanorc

2 years agoFix edge case when comment is at start of line (#2237)
Jake Leahy [Mon, 6 Dec 2021 01:45:10 +0000 (12:45 +1100)]
Fix edge case when comment is at start of line (#2237)

2 years agoadd more types for nim (#2284)
antonl05 [Tue, 23 Nov 2021 06:41:04 +0000 (12:11 +0530)]
add more types for nim (#2284)

2 years agoFix
Zachary Yedidia [Tue, 23 Nov 2021 02:46:36 +0000 (18:46 -0800)]
Fix

2 years agoUse abspath for local glob settings
Zachary Yedidia [Tue, 23 Nov 2021 02:45:19 +0000 (18:45 -0800)]
Use abspath for local glob settings

Ref #2276

2 years agoAdd support for alternatives system in Debian package (#1935)
Hugo Hromic [Wed, 17 Nov 2021 23:51:40 +0000 (23:51 +0000)]
Add support for alternatives system in Debian package (#1935)

* Allows for micro to be selectable in the `editor` group
* Use same priority as in the nano package

Ref: https://wiki.debian.org/DebianAlternatives

2 years agoFix linter help formatting (#2280)
Matthias Thym [Wed, 17 Nov 2021 20:59:16 +0000 (21:59 +0100)]
Fix linter help formatting (#2280)

2 years agoPython syntax: multiline string should be constant.string, not comment (#2268)
abaldota [Mon, 15 Nov 2021 05:54:56 +0000 (05:54 +0000)]
Python syntax: multiline string should be constant.string, not comment (#2268)

* Python syntax: multiline string should be comment.string, not comment 

''' delimits multiline strings, not comments

* Python syntax: multiline string should be comment.string, not comment 

''' delimits multiline strings, not comments

* Update python3.yaml for python3.10 keywords

2 years agoREADME: add MacPorts install info (#2265)
Herby Gillot [Sun, 7 Nov 2021 03:18:24 +0000 (23:18 -0400)]
README: add MacPorts install info (#2265)

2 years agoClarified some documentation (#2259)
Evan Shimoniak [Tue, 2 Nov 2021 20:26:14 +0000 (13:26 -0700)]
Clarified some documentation (#2259)

* Clarified meaning of indentchar setting

The description "sets the indentation character" combined with the default value of a space led me to believe that this was a way to set a preference for tabs/spaces and choose a number of spaces per indentation all at once. I've updated the description to try to make its true function clearer.

* Added note on rmtrailingws

This behavior was unexpected for me, so it's probably good to let other users know which option has precedence.

* Added details to help command

Initially I kept trying to use `help <command-name>` rather than `help commands`

2 years agoFix makefile for cross compilation
Zachary Yedidia [Fri, 29 Oct 2021 04:47:23 +0000 (04:47 +0000)]
Fix makefile for cross compilation

2 years agoFix regression: non-working direct colors in syntax files (#2252)
Dmitry Maluka [Wed, 27 Oct 2021 22:12:55 +0000 (00:12 +0200)]
Fix regression: non-working direct colors in syntax files (#2252)

After 9ad4437, directly specifying color names (instead of syntax groups)
in syntax files no longer works. In particular *.patch and *.diff files
are not highlighted, since in patch.yaml direct colors names are used.

Restore the previous behavior of GetColor (fallback to direct colors if
no syntax group found) to fix this regression, but also make some changes
in StringToStyle and StringToColor to still fix the issue which was fixed
by 9ad4437. In other words, ensure that there is no confusion between
direct colors ("red", "green" etc) and syntax groups omitted in the
colorscheme file.

2 years agoUpdate makefile generation rules
Zachary Yedidia [Wed, 29 Sep 2021 23:30:20 +0000 (16:30 -0700)]
Update makefile generation rules

Ref #2229

2 years agoSupport for highlighting all search matches (hlsearch) (#1762)
Dmitry Maluka [Tue, 28 Sep 2021 20:39:03 +0000 (22:39 +0200)]
Support for highlighting all search matches (hlsearch) (#1762)

* Support for highlighting all search matches (hlsearch)

hlsearch is implemented efficiently using the buffer's line array,
somewhat similarly to the syntax highlighting.
Unlike the syntax highlighter which highlights the entire file,
hlsearch searches for matches for the displayed lines only.
Matches are searched when the given line is displayed first time
or after it was modified. Otherwise the previously found matches
are used.

* Add UnhighlightSearch action

and add it to the list of actions triggered by Esc key by default.

* Add comment explaining the purpose of search map

* Add hlsearch colors to colorschemes

Mostly just copied from the corresponding original (mostly vim) colorschemes.

* Highlight matches during/after replace as well

As a side effect it also changes the last search value, i.e. affects FindNext
and FindPrevious, but it's probably fine. In vim it works the same way.

* Improve hlsearch option description

2 years agoFix some issues with default colors in colorschemes (#2225)
Dmitry Maluka [Tue, 28 Sep 2021 20:30:29 +0000 (22:30 +0200)]
Fix some issues with default colors in colorschemes (#2225)

* Fix default colors for unconfigured syntax groups

When GetColor is called for a syntax group not specified in the
colorscheme, it should fallback not to the terminal's default colors
(tcell.DefaultColor) but to the colorscheme's defaults (DefStyle)
which may be different from tcell.DefaultColor.

For example, if we are using micro's default colorscheme in a terminal
which uses a black-on-white theme, then dots and commas in Go files
("symbol" syntax group in go.yaml) are displayed black on a dark
background, i.e. barely visible.

* Avoid using terminal's default colors directly

If a syntax group color is set to "default" (which we have for some
syntax groups in some colorschemes), it defaults to the terminal's
default colors (tcell.DefaultColor), which is fine for 16-color
colorschemes but not quite fine for truecolor and 256-color
colorschemes which should not depend on the terminal colors.
It should default to the colorscheme's default (DefStyle) instead.

For example, if we are using micro's default colorscheme in a terminal
which uses a black-on-white theme, then "bool" type in C files
("type.extended" syntax group in c.yaml) is displayed black on a dark
background, i.e. barely visible.

2 years agoMake 'make' do the same as 'make build' (#2217)
Dmitry Maluka [Fri, 24 Sep 2021 21:40:26 +0000 (23:40 +0200)]
Make 'make' do the same as 'make build' (#2217)

Fix a slight regression after ec3292: when 'make' is run without specifying
a target, it counter-intuitively runs fetch-tags instead of building micro.

2 years agoFix #2190: Document goto command in commands.md (#2218)
Ryan Westlund [Fri, 24 Sep 2021 21:40:11 +0000 (21:40 +0000)]
Fix #2190: Document goto command in commands.md (#2218)

2 years agoFix #1943: 'Duplicated line' message being wrong (#2219)
Ryan Westlund [Fri, 24 Sep 2021 21:39:58 +0000 (21:39 +0000)]
Fix #1943: 'Duplicated line' message being wrong (#2219)

2 years agoSyntax Highlighting Support for FreeBSD Kernel Configuration Files (#2220)
TogoorooDev [Fri, 24 Sep 2021 21:39:46 +0000 (14:39 -0700)]
Syntax Highlighting Support for FreeBSD Kernel Configuration Files (#2220)

* added FreeBSD kernel configuration file format

* updated format, notably to highlight the word 'include'

2 years agonormalize path - force slash separator to access embed FS (#2197)
Ali Kefia [Wed, 25 Aug 2021 20:26:54 +0000 (22:26 +0200)]
normalize path - force slash separator to access embed FS (#2197)

2 years agoBuild : using go:generate and go:embed (#2195)
Ali Kefia [Wed, 25 Aug 2021 02:02:29 +0000 (04:02 +0200)]
Build : using go:generate and go:embed (#2195)

* using go:generate and go:embed

* fix import

2 years agoIgnore tool files
Zachary Yedidia [Sat, 21 Aug 2021 22:07:43 +0000 (18:07 -0400)]
Ignore tool files

2 years agoMore style improvements
Zachary Yedidia [Sat, 21 Aug 2021 22:04:08 +0000 (18:04 -0400)]
More style improvements

2 years agoMerge
Zachary Yedidia [Sat, 21 Aug 2021 21:58:35 +0000 (17:58 -0400)]
Merge

2 years agoImprove comments
Zachary Yedidia [Sat, 21 Aug 2021 21:58:30 +0000 (17:58 -0400)]
Improve comments

2 years agoremove carriage return from -clean prompt and fix broken logic (#2186)
Andrew Clarke [Sat, 21 Aug 2021 04:30:16 +0000 (14:30 +1000)]
remove carriage return from -clean prompt and fix broken logic (#2186)

2 years agoUpdate comment filetype when commenting
Zachary Yedidia [Fri, 20 Aug 2021 18:42:38 +0000 (14:42 -0400)]
Update comment filetype when commenting

2 years agoMerge branch 'master' of https://github.com/zyedidia/micro
Zachary Yedidia [Fri, 20 Aug 2021 17:56:22 +0000 (13:56 -0400)]
Merge branch 'master' of https://github.com/zyedidia/micro

2 years agoFix save with sudo auto-detection and sudo/doas message
Zachary Yedidia [Fri, 20 Aug 2021 17:55:59 +0000 (13:55 -0400)]
Fix save with sudo auto-detection and sudo/doas message

2 years agoFix formatting
Zachary Yedidia [Wed, 18 Aug 2021 20:55:51 +0000 (16:55 -0400)]
Fix formatting

2 years agoUpdate install instructions
Zachary Yedidia [Wed, 18 Aug 2021 20:55:22 +0000 (16:55 -0400)]
Update install instructions

2 years agoAdd eget to install instructions
Zachary Yedidia [Wed, 18 Aug 2021 20:13:17 +0000 (16:13 -0400)]
Add eget to install instructions

2 years agoplugins.md: update link to the internal documentation (#2191)
Dmitry Maluka [Wed, 18 Aug 2021 19:35:49 +0000 (21:35 +0200)]
plugins.md: update link to the internal documentation (#2191)

godoc.org now redirects to pkg.go.dev and it's not obvious how to locate
the internal packages documentation at https://pkg.go.dev/github.com/zyedidia/micro

2 years agoUpdate runtime
Zachary Yedidia [Wed, 18 Aug 2021 05:09:53 +0000 (01:09 -0400)]
Update runtime

2 years agoMerge
Zachary Yedidia [Wed, 18 Aug 2021 05:08:58 +0000 (01:08 -0400)]
Merge

2 years agoAdd rust clippy linter and go vet linter
Zachary Yedidia [Wed, 18 Aug 2021 05:08:54 +0000 (01:08 -0400)]
Add rust clippy linter and go vet linter

2 years agoMake yes/no prompts case-insensitive (#2182)
john-batch [Sat, 14 Aug 2021 03:56:26 +0000 (05:56 +0200)]
Make yes/no prompts case-insensitive (#2182)

2 years agoMerge branch 'pyfisch-patch-3' v2.0.10
Zachary Yedidia [Sat, 7 Aug 2021 00:45:12 +0000 (20:45 -0400)]
Merge branch 'pyfisch-patch-3'

2 years agoMerge branch 'patch-3' of https://github.com/pyfisch/micro into pyfisch-patch-3
Zachary Yedidia [Sat, 7 Aug 2021 00:44:57 +0000 (20:44 -0400)]
Merge branch 'patch-3' of https://github.com/pyfisch/micro into pyfisch-patch-3

2 years agoHighlight racket files as lisp (#1931)
riley [Sat, 7 Aug 2021 00:38:22 +0000 (20:38 -0400)]
Highlight racket files as lisp (#1931)

Add syntax highlighting for [racket](racket-lang.org), a (variant of scheme which is a) variant of lisp which uses the .rkt extension.

2 years agoUpdate v.yaml (#1925)
AAAA [Sat, 7 Aug 2021 00:37:42 +0000 (19:37 -0500)]
Update v.yaml (#1925)

Improvements:
 - Use proper scope names for better colorization
 - Better regex to detect binary, octal, decimal and hexadecimal numbers
 - Extend some definitions based on the Vlang docs

Co-authored-by: AAAA <dev@onerbs.com>
2 years agoFixes for syntax and docs
Zachary Yedidia [Tue, 3 Aug 2021 04:07:14 +0000 (00:07 -0400)]
Fixes for syntax and docs

Fixes #2163
Ref #2173

2 years agoDocument that "bubblegum" is a light theme (#2153)
Andrey Nering [Tue, 3 Aug 2021 01:13:05 +0000 (22:13 -0300)]
Document that "bubblegum" is a light theme (#2153)

2 years agoMerge
Zachary Yedidia [Tue, 3 Aug 2021 01:06:28 +0000 (21:06 -0400)]
Merge

2 years agoAllow aborting while opening a file with backup
Zachary Yedidia [Tue, 3 Aug 2021 01:05:22 +0000 (21:05 -0400)]
Allow aborting while opening a file with backup

Also fixes an issue where the abort prompt consumes interrupt signals.

Fixes #2151

2 years agoMore precise filename detection for shell scripts
pyfisch [Wed, 21 Jul 2021 19:44:32 +0000 (21:44 +0200)]
More precise filename detection for shell scripts

Make the regular expression much more precise:

* match literal dots instead of any char (match rc.conf but not rcXconf)
* match special filenames exactly (match PKGBUILD but not myPKGBUILD.something)

Run build-all to update internal/config/runtime.go

closes #2163

2 years agoUpdate rust syntax: don't highlight lifetimes (#2164)
pyfisch [Wed, 21 Jul 2021 19:02:28 +0000 (21:02 +0200)]
Update rust syntax: don't highlight lifetimes (#2164)

Work-around rust lifetimes and character literals both using single quotes.

2 years agoUpdate rust syntax: char literal (#2162)
pyfisch [Wed, 21 Jul 2021 16:37:41 +0000 (18:37 +0200)]
Update rust syntax: char literal (#2162)

Highlight character literals started with a single quote (').
Importantly this ensures correct highlighting for the character literal '"'.
Limitation: rust char literals contain exactly one character, however this isn't checked by the highlighter.

Closes #2160

2 years agoFix name collision on linter name (swiftc) (#2158)
Ali Kefia [Sun, 18 Jul 2021 22:30:52 +0000 (00:30 +0200)]
Fix name collision on linter name (swiftc) (#2158)

2 years agoShellcheck as a new shell linter + runtime.go out of git control (#2157)
Ali Kefia [Fri, 16 Jul 2021 19:01:50 +0000 (21:01 +0200)]
Shellcheck as a new shell linter + runtime.go out of git control (#2157)

* shellcheck as a new shell linter + runtime.go out of git control

* keep runtime.go and keep both shfmt and shellcheck since we can remove from custom conf

2 years agoAdd alcritty and foot to the list of OSC 52 supporting terminals (#2154)
Rylee [Wed, 14 Jul 2021 03:37:48 +0000 (13:37 +1000)]
Add alcritty and foot to the list of OSC 52 supporting terminals (#2154)

2 years agoSearch the last match on line when search back (#2156)
Ali Kefia [Wed, 14 Jul 2021 03:37:22 +0000 (05:37 +0200)]
Search the last match on line when search back (#2156)

2 years agoAdd default binding for FindLiteral
Zachary Yedidia [Mon, 5 Jul 2021 00:00:49 +0000 (20:00 -0400)]
Add default binding for FindLiteral

2 years agoMerge
Zachary Yedidia [Thu, 17 Jun 2021 21:11:35 +0000 (17:11 -0400)]
Merge

2 years agoUpdate zyedidia/pty from upstream
Zachary Yedidia [Thu, 17 Jun 2021 21:10:59 +0000 (17:10 -0400)]
Update zyedidia/pty from upstream

Fixes #2138

2 years agoAdd nix language syntax (#2024)
vandervoortj [Tue, 15 Jun 2021 21:56:31 +0000 (17:56 -0400)]
Add nix language syntax (#2024)

* Create nix.yaml

Add nix language syntax

* Add nix-linter

2 years agoFix typo in tutorial.md (#2130)
Kethan [Sun, 13 Jun 2021 03:52:08 +0000 (20:52 -0700)]
Fix typo in tutorial.md (#2130)

2 years agofind: select prefilled text (#2127)
Dmitry Maluka [Wed, 9 Jun 2021 21:04:11 +0000 (23:04 +0200)]
find: select prefilled text (#2127)

The new feature of prefilling the search bar with the selected text (added
in 3d0b5db) has an annoying side effect: if we do have some text selected
but we want to search for some other pattern, not the selected text,
then we have to manually delete the prefilled text before we can start
entering our wanted search pattern.

A simple solution is to select the prefilled text, so that we can replace it
with our pattern right away just by typing, without any additional keystrokes.

2 years agoAdd desktop-id to Appstream Metainfo (#2122)
Balló György [Sun, 6 Jun 2021 21:53:33 +0000 (23:53 +0200)]
Add desktop-id to Appstream Metainfo (#2122)

It's needed for tools like appstream-generator to detect the associated desktop file.

2 years agofind: prefill with selection (#2115)
Ali Kefia [Wed, 2 Jun 2021 20:04:31 +0000 (22:04 +0200)]
find: prefill with selection (#2115)

* find: prefill with selection

* keep search func - could be used in plugins

3 years agoImprove linter performance (#2083)
Jeff Zhao [Tue, 1 Jun 2021 23:34:10 +0000 (19:34 -0400)]
Improve linter performance (#2083)

Only compute args if we are actually going to use it

3 years agoAdd highlighting for user-defined types (#2107)
Rosetta H&S [Tue, 1 Jun 2021 23:33:40 +0000 (07:33 +0800)]
Add highlighting for user-defined types  (#2107)

* Added highlighting for user-defined types

Provides automatic highlighting of user-defined types ending with either "_t" or "_T", as is seen in editors such as Nano, or within GitHub itself.

* Update cpp.yaml

3 years agoDont take # as comment when preceded by backslash (#2112)
Héctor M. Monacci [Tue, 1 Jun 2021 23:33:06 +0000 (20:33 -0300)]
Dont take # as comment when preceded by backslash (#2112)

When escaped with a backslash (e.g., inside a regex) the numeral char, ```#```, shouldn't be interpreted as a beginning of comment.

3 years agoFix erlang comment syntax
Zachary Yedidia [Tue, 1 Jun 2021 00:26:32 +0000 (20:26 -0400)]
Fix erlang comment syntax

3 years agoUpdate tcell
Zachary Yedidia [Mon, 24 May 2021 05:43:11 +0000 (01:43 -0400)]
Update tcell

Fixes #2108

3 years agoWarn for readonly instead of setting option
Zachary Yedidia [Wed, 19 May 2021 18:58:00 +0000 (14:58 -0400)]
Warn for readonly instead of setting option

Fixes #2106

3 years agoUpdate tcell v2.0.9
Zachary Yedidia [Sun, 16 May 2021 20:35:47 +0000 (16:35 -0400)]
Update tcell

Fixes #2081

3 years agoMerge pull request #2076 from dmaluka/softwrap-improvement2
Zachary Yedidia [Wed, 12 May 2021 00:36:23 +0000 (20:36 -0400)]
Merge pull request #2076 from dmaluka/softwrap-improvement2

Softwrap improvements

3 years agoMerge
Zachary Yedidia [Wed, 21 Apr 2021 01:28:37 +0000 (21:28 -0400)]
Merge

3 years agoHandle SIGHUP properly
Zachary Yedidia [Wed, 21 Apr 2021 01:27:59 +0000 (21:27 -0400)]
Handle SIGHUP properly

Fixes #2085

Not the nicest solution but it will do for now.

3 years agoFix up X,Y values in BufView
Dmitry Maluka [Thu, 8 Apr 2021 23:48:58 +0000 (01:48 +0200)]
Fix up X,Y values in BufView

Let's return absolute X, Y values, rather than relative to the bufwindow.

3 years agoReplace BufWidth & BufHeight with BufView
Dmitry Maluka [Thu, 8 Apr 2021 21:32:00 +0000 (23:32 +0200)]
Replace BufWidth & BufHeight with BufView

BufView returns not only the buffer's width and height but also its
x,y position. It may be useful e.g. for checking if a mouse click was
on the actual buffer or ourside it, e.g. on the gutter.

3 years agoDon't highlight padding spaces in word wrapping
Dmitry Maluka [Wed, 17 Mar 2021 22:25:15 +0000 (23:25 +0100)]
Don't highlight padding spaces in word wrapping

Don't highlight space characters at the right edge which are used just
for padding after line break in word wrapping, i.e. don't correspond to
any real characters in the buffer.

This makes it look nicer e.g. when selecting word-wrapped text.

3 years agoImplement word wrapping
Dmitry Maluka [Wed, 17 Mar 2021 21:34:30 +0000 (22:34 +0100)]
Implement word wrapping

Fixes #264
Fixes #1644

3 years agoSimplify LocFromVisual implementation
Dmitry Maluka [Sun, 7 Mar 2021 13:56:00 +0000 (14:56 +0100)]
Simplify LocFromVisual implementation

Now that we have LocFromVLoc, we can radically simplify the code of LocFromVisual.
Less duplication, less potential bugs.

3 years agoImplement moving cursor up/down within a wrapped line
Dmitry Maluka [Sat, 6 Mar 2021 22:43:36 +0000 (23:43 +0100)]
Implement moving cursor up/down within a wrapped line

Modified behavior of CursorUp, CursorDown, CursorPageUp etc:
if softwrap is enabled, cursor moves by visual lines, not logical lines.

TODO: implement it also for Home and End keys: move cursor to the
visual start or end of a line. I haven't implemented it for now, because
I'm not sure what should be the behavior of StartOfTextToggle then
(considering that Home key is bound to StartOfTextToggle by default).

Fixes #1598

3 years agoAdd VLoc, VLocFromLoc and LocFromVLoc
Dmitry Maluka [Wed, 17 Mar 2021 20:16:52 +0000 (21:16 +0100)]
Add VLoc, VLocFromLoc and LocFromVLoc

VLoc allows any location in the buffer to be represented as a visual
location in the linewrapped buffer. In particular, this is useful
for implementing moving cursor up and down within a wrapped line.

3 years agoFix horizontal scrolling with a wide rune at the right edge of window
Dmitry Maluka [Wed, 3 Mar 2021 19:09:35 +0000 (20:09 +0100)]
Fix horizontal scrolling with a wide rune at the right edge of window

3 years agoFix displaying incomplete tab or wide rune at the right edge of window
Dmitry Maluka [Wed, 17 Mar 2021 19:13:25 +0000 (20:13 +0100)]
Fix displaying incomplete tab or wide rune at the right edge of window

Fix displaying tabs and wide runes which don't fit in the window.
Don't overwrite the vertical divider and the adjacent window.

- For tabs: display only as many of the tab's spaces as fit in the window.

- For wide runes: if a rune doesn't fit, don't display it in this line at all.
  If softwrap is on, display this rune in the next line.

Fixes #1979

3 years agoFix horizontal scrolling issue after toggling softwrap on/off
Dmitry Maluka [Wed, 3 Mar 2021 19:51:06 +0000 (20:51 +0100)]
Fix horizontal scrolling issue after toggling softwrap on/off

Fixes #645

3 years agoAdd BufWidth and BufHeight
Dmitry Maluka [Sat, 27 Feb 2021 16:37:15 +0000 (17:37 +0100)]
Add BufWidth and BufHeight

Fixes issue with the usage of a slightly incorrect buffer height value
(v.Height should be v.Height-1 if statusline is displayed).

Also, to avoid too many duplications, the code reorganized a little:
buffer display params (width, height, gutter offset and others) are
calculated in a single place.

3 years agoUpdate and rename perl6.yaml to raku.yaml (#1927)
Alex Tsantilis [Wed, 7 Apr 2021 20:21:19 +0000 (16:21 -0400)]
Update and rename perl6.yaml to raku.yaml (#1927)

The language has been renamed but still aims to support the old file extensions for a time.

3 years agoImprove patch file detection by adding a header rule. (#1942)
Laszlo Gombos [Wed, 7 Apr 2021 20:20:57 +0000 (16:20 -0400)]
Improve patch file detection by adding a header rule. (#1942)

3 years agoAdd buffer.WordAt (#2070)
Dmitry Maluka [Wed, 7 Apr 2021 20:20:39 +0000 (22:20 +0200)]
Add buffer.WordAt (#2070)

Add buffer.WordAt function returning the word around a given location
in the buffer. Useful for plugins.

3 years agoFix softwrap scrolling issues (#1981)
Dmitry Maluka [Wed, 7 Apr 2021 20:18:51 +0000 (22:18 +0200)]
Fix softwrap scrolling issues (#1981)

Softwrap implementation enhanced to fix various issues with scrolling,
centering, relocating etc.

The main idea is simple: work not with simple line numbers but
with (Line, Row) pairs, where Line is a line number in the buffer
and Row is a visual line (a row) number within this line.
The logic remains mostly the same, but simple arithmetic operations
on line numbers are replaced with corresponding operations on
(Line, Row) pairs.

Fixes #632, #1657

3 years agoMerge
Zachary Yedidia [Mon, 8 Mar 2021 18:11:08 +0000 (13:11 -0500)]
Merge

3 years agoUpdate runewidth version
Zachary Yedidia [Mon, 8 Mar 2021 18:10:52 +0000 (13:10 -0500)]
Update runewidth version

Fixes #1873

3 years agoUpdate snap badge
Zachary Yedidia [Sat, 6 Mar 2021 01:57:31 +0000 (20:57 -0500)]
Update snap badge

3 years agoMerge
Zachary Yedidia [Tue, 2 Mar 2021 22:16:54 +0000 (17:16 -0500)]
Merge

3 years agoFix noregex interactive replace
Zachary Yedidia [Tue, 2 Mar 2021 22:16:19 +0000 (17:16 -0500)]
Fix noregex interactive replace

Fixes #2052

3 years agoAdd ForceQuit action
Zachary Yedidia [Tue, 2 Mar 2021 02:55:49 +0000 (21:55 -0500)]
Add ForceQuit action

Closes #1039

3 years agoFix regressions in buffer settings initialization (#2035)
Dmitry Maluka [Mon, 22 Feb 2021 23:18:37 +0000 (00:18 +0100)]
Fix regressions in buffer settings initialization (#2035)

Fix regressions after ba98b55:

- Unable to override filetype autodetection by setting a specific filetype
  for specific files, i.e. this doesn't work:

    "*.h": {
        "filetype": "c++"
    },

- Unable to enable/disable syntax highlighting for specific files,
  i.e. this doesn't work:

    "*.c": {
        "syntax": false
    },

- "readonly" setting doesn't work (neither global nor per-filetype).

3 years agoRemove conf highlighting (too many conflicts)
Zachary Yedidia [Sat, 20 Feb 2021 19:27:58 +0000 (14:27 -0500)]
Remove conf highlighting (too many conflicts)

Fixes #2031

The conf highlighter interferes with many more specific highlighters and
doesn't provide much value on its own.

3 years agoFix #2030: warn for invalid pane type
Zachary Yedidia [Fri, 19 Feb 2021 00:02:23 +0000 (19:02 -0500)]
Fix #2030: warn for invalid pane type

3 years agoImprove C syntax highlighting (#2015)
relrelb [Thu, 18 Feb 2021 03:28:19 +0000 (05:28 +0200)]
Improve C syntax highlighting (#2015)

3 years agoAdd Gemini syntax file (#2016)
Nikolay Korotkiy [Thu, 18 Feb 2021 03:27:56 +0000 (06:27 +0300)]
Add Gemini syntax file (#2016)

3 years agoAdd .tsx support for Typescript syntax (#2021)
Sebastian Kolind Sørensen [Thu, 18 Feb 2021 03:27:45 +0000 (04:27 +0100)]
Add .tsx support for Typescript syntax (#2021)

* Update to look for tsx files also

* Shorten filename detection