textbringer 1.0.9 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 42dc4dbbf6e190e38d32657942af39c2bf5afec5035a6674d54a7d621c755086
4
- data.tar.gz: dbaa67ad2fca2b24d661610e7467b94022da87928473a2a37a7169deda7a27ac
3
+ metadata.gz: '0950d5d14bd72c43ec2270cbb545c0dc464b66662f85099ec5eed8dc3a5a56db'
4
+ data.tar.gz: 1874b1aa43e1ba76fc2d1c9c74f9351a3dc28a15b85c7d6a085cd8d5b669adb3
5
5
  SHA512:
6
- metadata.gz: c765b54dc47b490c8fe9d53b84b00734281a1d5e5e22714eaba7c9a69c71480271fb0b34a2883fed4f7ad4be1fc2933871e1c0fe5585e16e12b87f569a8ee662
7
- data.tar.gz: '0684345317fcf495d5cf0f7951e120f88f24f025f8c14960dac33874c131f70f2c6a24e1ee6b8b8774783deea8b80c9047a063a8f0fe79666824578e5e54f5dc'
6
+ metadata.gz: 63431a1a5a0425007e119cf3573b86d61d3a1df8cca7c8658ee5fd479201696adfeddb80c2a085fca1df89fa16862d47664a5f85ae31fd09fd4f36ce73058d71
7
+ data.tar.gz: 95876e6af0b0be40b684ac3b0703aaa08370b23647f50b4231d61bd5c8e9411ad0798107cc77f4cb67bcf06fbcbfdaaaf47074322933052783b29a7722d2ffed
@@ -20,6 +20,3 @@ jobs:
20
20
  bundle install
21
21
  - name: Run test
22
22
  run: xvfb-run bundle exec rake test
23
- env:
24
- UPLOAD_TO_CODECOV: 1
25
- CODECOV_TOKEN: ${{secrets.CODECOV_TOKEN}}
data/CHANGES.md CHANGED
@@ -1,3 +1,8 @@
1
+ ## 1.1.0
2
+
3
+ * Show unsaved buffers on exit
4
+ * Bug fixes.
5
+
1
6
  ## 1.0.9
2
7
 
3
8
  * Remove mazegaki.dic and bushu.rev
data/README.md CHANGED
@@ -4,7 +4,6 @@
4
4
  [![ubuntu](https://github.com/shugo/textbringer/workflows/ubuntu/badge.svg)](https://github.com/shugo/textbringer/actions?query=workflow%3Aubuntu)
5
5
  [![windows](https://github.com/shugo/textbringer/workflows/windows/badge.svg)](https://github.com/shugo/textbringer/actions?query=workflow%3Awindows)
6
6
  [![macos](https://github.com/shugo/textbringer/workflows/macos/badge.svg)](https://github.com/shugo/textbringer/actions?query=workflow%3Amacos)
7
- [![codecov](https://codecov.io/gh/shugo/textbringer/branch/master/graph/badge.svg)](https://codecov.io/gh/shugo/textbringer)
8
7
 
9
8
  Textbringer is a member of a demon race that takes on the form of an Emacs-like
10
9
  text editor.
@@ -1,5 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
+ # Usage: merge_mazegaki_dic /path/to/mazegaki.dic /path/to/skkdic/SKK-JISYO.* > ~/.textbringer/tcode/mazegaki.dic
4
+
3
5
  MAZEGAKI_DIC = Hash.new([])
4
6
 
5
7
  ARGF.each_line do |line|
data/exe/textbringer CHANGED
@@ -1,5 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
+ $VERBOSE = nil
4
+
3
5
  require "textbringer"
4
6
 
5
7
  include Textbringer
@@ -13,8 +15,6 @@ def load_user_config(path)
13
15
  end
14
16
  end
15
17
 
16
- $VERBOSE = nil
17
-
18
18
  unless STDIN.tty?
19
19
  STDERR.puts("textbringer: standard input is not a tty")
20
20
  exit 1
@@ -1587,15 +1587,15 @@ def write_to_file(f)
1587
1587
 
1588
1588
  def push_undo(action)
1589
1589
  return if @undoing || @undo_limit == 0
1590
+ if !modified?
1591
+ action.version = @version
1592
+ end
1590
1593
  if @composite_edit_level > 0
1591
1594
  @composite_edit_actions.push(action)
1592
1595
  else
1593
1596
  if @undo_stack.size >= @undo_limit
1594
1597
  @undo_stack[0, @undo_stack.size + 1 - @undo_limit] = []
1595
1598
  end
1596
- if !modified?
1597
- action.version = @version
1598
- end
1599
1599
  @undo_stack.push(action)
1600
1600
  @redo_stack.clear
1601
1601
  end
@@ -6,7 +6,12 @@ module Commands
6
6
  end
7
7
 
8
8
  define_command(:exit_textbringer) do |status = 0|
9
- if Buffer.any? { |buffer| /\A\*/ !~ buffer.name && buffer.modified? }
9
+ unsaved_buffers = Buffer.filter { |buffer|
10
+ /\A\*/ !~ buffer.name && buffer.modified?
11
+ }
12
+ if !unsaved_buffers.empty?
13
+ list_buffers(unsaved_buffers)
14
+ Window.redisplay
10
15
  return unless yes_or_no?("Unsaved buffers exist; exit anyway?")
11
16
  end
12
17
  exit(status)
@@ -84,7 +84,7 @@ module Commands
84
84
  end
85
85
  end
86
86
 
87
- define_command(:list_buffers, doc: <<~EOD) do
87
+ define_command(:list_buffers, doc: <<~EOD) do |buffers = Buffer.list|
88
88
  List the existing buffers.
89
89
  EOD
90
90
  buffer = Buffer.find_or_new("*Buffer List*",
@@ -92,7 +92,7 @@ module Commands
92
92
  buffer.apply_mode(BufferListMode)
93
93
  buffer.read_only_edit do
94
94
  buffer.clear
95
- buffer.insert(Buffer.list.map(&:name).join("\n"))
95
+ buffer.insert(buffers.map(&:name).join("\n"))
96
96
  buffer.beginning_of_buffer
97
97
  end
98
98
  switch_to_buffer(buffer)
@@ -1,3 +1,3 @@
1
1
  module Textbringer
2
- VERSION = "1.0.9"
2
+ VERSION = "1.1.0"
3
3
  end
data/textbringer.gemspec CHANGED
@@ -22,15 +22,14 @@ Gem::Specification.new do |spec|
22
22
  spec.required_ruby_version = '>= 2.6'
23
23
 
24
24
  spec.add_runtime_dependency "curses", ">= 1.2.7"
25
- spec.add_runtime_dependency "unicode-display_width", "~> 1.1"
26
- spec.add_runtime_dependency "clipboard", "~> 1.1"
25
+ spec.add_runtime_dependency "unicode-display_width", ">= 1.1"
26
+ spec.add_runtime_dependency "clipboard", ">= 1.1"
27
27
  spec.add_runtime_dependency "fiddley", ">= 0.0.5"
28
28
  spec.add_runtime_dependency "editorconfig"
29
29
 
30
30
  spec.add_development_dependency "bundler"
31
- spec.add_development_dependency "rake", "~> 12.0"
31
+ spec.add_development_dependency "rake", ">= 12.0"
32
32
  spec.add_development_dependency "test-unit"
33
33
  spec.add_development_dependency "simplecov"
34
- spec.add_development_dependency "codecov"
35
34
  spec.add_development_dependency "ripper-tags"
36
35
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: textbringer
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.9
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shugo Maeda
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-03-26 00:00:00.000000000 Z
11
+ date: 2021-06-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: curses
@@ -28,28 +28,28 @@ dependencies:
28
28
  name: unicode-display_width
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - "~>"
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
33
  version: '1.1'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - "~>"
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: '1.1'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: clipboard
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - "~>"
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
47
  version: '1.1'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - "~>"
52
+ - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: '1.1'
55
55
  - !ruby/object:Gem::Dependency
@@ -98,14 +98,14 @@ dependencies:
98
98
  name: rake
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
- - - "~>"
101
+ - - ">="
102
102
  - !ruby/object:Gem::Version
103
103
  version: '12.0'
104
104
  type: :development
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
- - - "~>"
108
+ - - ">="
109
109
  - !ruby/object:Gem::Version
110
110
  version: '12.0'
111
111
  - !ruby/object:Gem::Dependency
@@ -136,20 +136,6 @@ dependencies:
136
136
  - - ">="
137
137
  - !ruby/object:Gem::Version
138
138
  version: '0'
139
- - !ruby/object:Gem::Dependency
140
- name: codecov
141
- requirement: !ruby/object:Gem::Requirement
142
- requirements:
143
- - - ">="
144
- - !ruby/object:Gem::Version
145
- version: '0'
146
- type: :development
147
- prerelease: false
148
- version_requirements: !ruby/object:Gem::Requirement
149
- requirements:
150
- - - ">="
151
- - !ruby/object:Gem::Version
152
- version: '0'
153
139
  - !ruby/object:Gem::Dependency
154
140
  name: ripper-tags
155
141
  requirement: !ruby/object:Gem::Requirement