aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJakob Schnitzer <mail@jakobschnitzer.de>2017-04-24 11:35:10 +0200
committerJakob Schnitzer <mail@jakobschnitzer.de>2017-04-24 11:35:10 +0200
commitff8b2eb435c518f0eafd0e509afe1f5ee4a81fd1 (patch)
tree526b1df09b06121bdbc6ef5254ef53821958a6cb /src
parent4049492b6d7b8805686b14dbacb3b729abd03308 (diff)
parent7f6d3d305269fd1139bc2aec9a91bf98ad595199 (diff)
downloadrneovim-ff8b2eb435c518f0eafd0e509afe1f5ee4a81fd1.tar.gz
rneovim-ff8b2eb435c518f0eafd0e509afe1f5ee4a81fd1.tar.bz2
rneovim-ff8b2eb435c518f0eafd0e509afe1f5ee4a81fd1.zip
Merge branch 'master' into option-fixes
Diffstat (limited to 'src')
-rwxr-xr-xsrc/clint.py3
-rw-r--r--src/coverity-model.c2
-rw-r--r--src/nvim/CMakeLists.txt170
-rw-r--r--src/nvim/api/buffer.c53
-rw-r--r--src/nvim/api/private/defs.h8
-rw-r--r--src/nvim/api/private/dispatch.c3
-rw-r--r--src/nvim/api/private/handle.c3
-rw-r--r--src/nvim/api/private/helpers.c133
-rw-r--r--src/nvim/api/private/helpers.h9
-rw-r--r--src/nvim/api/tabpage.c7
-rw-r--r--src/nvim/api/ui.c64
-rw-r--r--src/nvim/api/vim.c57
-rw-r--r--src/nvim/api/window.c19
-rw-r--r--src/nvim/arabic.c3
-rw-r--r--src/nvim/buffer.c20
-rw-r--r--src/nvim/buffer.h3
-rw-r--r--src/nvim/charset.c75
-rw-r--r--src/nvim/cursor.c3
-rw-r--r--src/nvim/cursor_shape.c181
-rw-r--r--src/nvim/cursor_shape.h79
-rw-r--r--src/nvim/diff.c7
-rw-r--r--src/nvim/diff.h3
-rw-r--r--src/nvim/digraph.c24
-rw-r--r--src/nvim/digraph.h3
-rw-r--r--src/nvim/edit.c40
-rw-r--r--src/nvim/eval.c444
-rw-r--r--src/nvim/eval.lua5
-rw-r--r--src/nvim/eval/decode.c35
-rw-r--r--src/nvim/eval/encode.c71
-rw-r--r--src/nvim/eval/executor.c3
-rw-r--r--src/nvim/eval/gc.c3
-rw-r--r--src/nvim/eval/typval.c49
-rw-r--r--src/nvim/eval/typval.h18
-rw-r--r--src/nvim/eval/typval_encode.c.h6
-rw-r--r--src/nvim/event/libuv_process.c11
-rw-r--r--src/nvim/event/loop.c3
-rw-r--r--src/nvim/event/multiqueue.c3
-rw-r--r--src/nvim/event/process.c3
-rw-r--r--src/nvim/event/rstream.c3
-rw-r--r--src/nvim/event/signal.c3
-rw-r--r--src/nvim/event/socket.c3
-rw-r--r--src/nvim/event/stream.c3
-rw-r--r--src/nvim/event/time.c3
-rw-r--r--src/nvim/event/wstream.c3
-rw-r--r--src/nvim/ex_cmds.c15
-rw-r--r--src/nvim/ex_cmds.h2
-rw-r--r--src/nvim/ex_cmds2.c3
-rw-r--r--src/nvim/ex_docmd.c34
-rw-r--r--src/nvim/ex_eval.c3
-rw-r--r--src/nvim/ex_getln.c24
-rw-r--r--src/nvim/ex_getln.h3
-rw-r--r--src/nvim/farsi.c5
-rw-r--r--src/nvim/file_search.c5
-rw-r--r--src/nvim/file_search.h5
-rw-r--r--src/nvim/fileio.c268
-rw-r--r--src/nvim/fold.c103
-rw-r--r--src/nvim/fold.h5
-rw-r--r--src/nvim/garray.c3
-rw-r--r--src/nvim/getchar.c20
-rw-r--r--src/nvim/getchar.h5
-rw-r--r--src/nvim/globals.h4
-rw-r--r--src/nvim/hardcopy.c14
-rw-r--r--src/nvim/hardcopy.h4
-rw-r--r--src/nvim/hashtab.c3
-rw-r--r--src/nvim/iconv.h4
-rw-r--r--src/nvim/if_cscope.c3
-rw-r--r--src/nvim/if_cscope.h3
-rw-r--r--src/nvim/indent.c6
-rw-r--r--src/nvim/indent_c.c4
-rw-r--r--src/nvim/keymap.c43
-rw-r--r--src/nvim/log.c3
-rw-r--r--src/nvim/macros.h27
-rw-r--r--src/nvim/main.c5
-rw-r--r--src/nvim/map.c4
-rw-r--r--src/nvim/map.h1
-rw-r--r--src/nvim/mark.c3
-rw-r--r--src/nvim/mark.h41
-rw-r--r--src/nvim/mbyte.c85
-rw-r--r--src/nvim/mbyte.h1
-rw-r--r--src/nvim/memfile.c3
-rw-r--r--src/nvim/memfile_defs.h2
-rw-r--r--src/nvim/memline.c46
-rw-r--r--src/nvim/memline.h2
-rw-r--r--src/nvim/memory.c10
-rw-r--r--src/nvim/menu.c3
-rw-r--r--src/nvim/menu.h5
-rw-r--r--src/nvim/message.c39
-rw-r--r--src/nvim/misc1.c9
-rw-r--r--src/nvim/mouse.c4
-rw-r--r--src/nvim/move.c3
-rw-r--r--src/nvim/move.h2
-rw-r--r--src/nvim/msgpack_rpc/channel.c25
-rw-r--r--src/nvim/msgpack_rpc/helpers.c42
-rw-r--r--src/nvim/msgpack_rpc/server.c3
-rw-r--r--src/nvim/normal.c33
-rw-r--r--src/nvim/ops.c33
-rw-r--r--src/nvim/ops.h2
-rw-r--r--src/nvim/option.c46
-rw-r--r--src/nvim/option_defs.h5
-rw-r--r--src/nvim/options.lua21
-rw-r--r--src/nvim/os/dl.c3
-rw-r--r--src/nvim/os/env.c86
-rw-r--r--src/nvim/os/fileio.c57
-rw-r--r--src/nvim/os/fs.c5
-rw-r--r--src/nvim/os/input.c6
-rw-r--r--src/nvim/os/mem.c3
-rw-r--r--src/nvim/os/pty_process_unix.c3
-rw-r--r--src/nvim/os/shell.c7
-rw-r--r--src/nvim/os/signal.c3
-rw-r--r--src/nvim/os/stdpaths.c3
-rw-r--r--src/nvim/os/time.c3
-rw-r--r--src/nvim/os/users.c3
-rw-r--r--src/nvim/os_unix.c3
-rw-r--r--src/nvim/path.c23
-rw-r--r--src/nvim/po/fi.po7517
-rw-r--r--src/nvim/po/uk.po6
-rw-r--r--src/nvim/popupmnu.c3
-rw-r--r--src/nvim/profile.c3
-rw-r--r--src/nvim/quickfix.c9
-rw-r--r--src/nvim/rbuffer.c3
-rw-r--r--src/nvim/regexp.c61
-rw-r--r--src/nvim/regexp_nfa.c49
-rw-r--r--src/nvim/screen.c153
-rw-r--r--src/nvim/screen.h4
-rw-r--r--src/nvim/search.c28
-rw-r--r--src/nvim/search.h6
-rw-r--r--src/nvim/sha256.c3
-rw-r--r--src/nvim/shada.c235
-rw-r--r--src/nvim/spell.c48
-rw-r--r--src/nvim/spell_defs.h4
-rw-r--r--src/nvim/spellfile.c159
-rw-r--r--src/nvim/state.c3
-rw-r--r--src/nvim/strings.c90
-rw-r--r--src/nvim/syntax.c224
-rw-r--r--src/nvim/syntax.h10
-rw-r--r--src/nvim/tag.c31
-rw-r--r--src/nvim/terminal.c10
-rw-r--r--src/nvim/testdir/samples/memfile_test.c3
-rw-r--r--src/nvim/testdir/test_alot.vim1
-rw-r--r--src/nvim/testdir/test_fold.vim118
-rw-r--r--src/nvim/testdir/test_functions.vim144
-rw-r--r--src/nvim/testdir/test_mapping.vim90
-rw-r--r--src/nvim/testdir/test_normal.vim46
-rw-r--r--src/nvim/testdir/test_taglist.vim58
-rw-r--r--src/nvim/testdir/test_timers.vim153
-rw-r--r--src/nvim/tui/input.c11
-rw-r--r--src/nvim/tui/tui.c251
-rw-r--r--src/nvim/tui/tui.h2
-rw-r--r--src/nvim/ugrid.c3
-rw-r--r--src/nvim/ui.c44
-rw-r--r--src/nvim/ui.h4
-rw-r--r--src/nvim/ui_bridge.c28
-rw-r--r--src/nvim/undo.c18
-rw-r--r--src/nvim/version.c41
-rw-r--r--src/nvim/version.h2
-rw-r--r--src/nvim/vim.h19
-rw-r--r--src/nvim/window.c3
-rw-r--r--src/nvim/window.h2
158 files changed, 6825 insertions, 5826 deletions
diff --git a/src/clint.py b/src/clint.py
index 61c53d128e..5174521fb8 100755
--- a/src/clint.py
+++ b/src/clint.py
@@ -571,7 +571,8 @@ class _CppLintState(object):
for category, count in self.errors_by_category.items():
sys.stderr.write('Category \'%s\' errors found: %d\n' %
(category, count))
- sys.stderr.write('Total errors found: %d\n' % self.error_count)
+ if self.error_count:
+ sys.stderr.write('Total errors found: %d\n' % self.error_count)
def SuppressErrorsFrom(self, fname):
"""Open file and read a list of suppressed errors from it"""
diff --git a/src/coverity-model.c b/src/coverity-model.c
index a01ea6d316..3c38e4ae4d 100644
--- a/src/coverity-model.c
+++ b/src/coverity-model.c
@@ -64,7 +64,7 @@ void *je_realloc(void *ptr, size_t size)
// of the memory allocated for item.
typedef struct {} dictitem_T;
typedef struct {} dict_T;
-int dict_add(dict_T *d, dictitem_T *item)
+int tv_dict_add(dict_T *const d, dictitem_T *const item)
{
__coverity_escape__(item);
}
diff --git a/src/nvim/CMakeLists.txt b/src/nvim/CMakeLists.txt
index a3bacaa9d2..db5e62fd67 100644
--- a/src/nvim/CMakeLists.txt
+++ b/src/nvim/CMakeLists.txt
@@ -10,6 +10,7 @@ if(USE_GCOV)
endif()
endif()
+set(TOUCHES_DIR ${PROJECT_BINARY_DIR}/touches)
set(GENERATED_DIR ${PROJECT_BINARY_DIR}/src/nvim/auto)
set(DISPATCH_GENERATOR ${PROJECT_SOURCE_DIR}/scripts/gendispatch.lua)
file(GLOB API_HEADERS api/*.h)
@@ -34,13 +35,26 @@ set(UNICODE_TABLES_GENERATOR ${PROJECT_SOURCE_DIR}/scripts/genunicodetables.lua)
set(UNICODE_DIR ${PROJECT_SOURCE_DIR}/unicode)
file(GLOB UNICODE_FILES ${UNICODE_DIR}/*.txt)
set(GENERATED_UNICODE_TABLES ${GENERATED_DIR}/unicode_tables.generated.h)
+set(LINT_SUPPRESS_FILE ${PROJECT_BINARY_DIR}/errors.json)
+set(LINT_SUPPRESS_URL_BASE "https://raw.githubusercontent.com/neovim/doc/gh-pages/reports/clint")
+set(LINT_SUPPRESS_URL "${LINT_SUPPRESS_URL_BASE}/errors.json")
+set(LINT_PRG ${PROJECT_SOURCE_DIR}/src/clint.py)
+set(DOWNLOAD_SCRIPT ${PROJECT_SOURCE_DIR}/cmake/Download.cmake)
+set(LINT_SUPPRESSES_ROOT ${PROJECT_BINARY_DIR}/errors)
+set(LINT_SUPPRESSES_URL "${LINT_SUPPRESS_URL_BASE}/errors.tar.gz")
+set(LINT_SUPPRESSES_ARCHIVE ${LINT_SUPPRESSES_ROOT}/errors.tar.gz)
+set(LINT_SUPPRESSES_TOUCH_FILE "${TOUCHES_DIR}/unpacked-clint-errors-archive")
+set(LINT_SUPPRESSES_INSTALL_SCRIPT "${PROJECT_SOURCE_DIR}/cmake/InstallClintErrors.cmake")
include_directories(${GENERATED_DIR})
include_directories(${CACHED_GENERATED_DIR})
include_directories(${GENERATED_INCLUDES_DIR})
+file(MAKE_DIRECTORY ${TOUCHES_DIR})
file(MAKE_DIRECTORY ${GENERATED_DIR})
file(MAKE_DIRECTORY ${GENERATED_INCLUDES_DIR})
+file(MAKE_DIRECTORY ${LINT_SUPPRESSES_ROOT})
+file(MAKE_DIRECTORY ${LINT_SUPPRESSES_ROOT}/src)
file(GLOB NVIM_SOURCES *.c)
file(GLOB NVIM_HEADERS *.h)
@@ -73,6 +87,8 @@ file(GLOB UNIT_TEST_FIXTURES ${PROJECT_SOURCE_DIR}/test/unit/fixtures/*.c)
list(SORT NVIM_SOURCES)
list(SORT NVIM_HEADERS)
+list(APPEND LINT_NVIM_SOURCES ${NVIM_SOURCES} ${NVIM_HEADERS})
+
foreach(sfile ${NVIM_SOURCES})
get_filename_component(f ${sfile} NAME)
if(${f} MATCHES "^(regexp_nfa.c)$")
@@ -393,76 +409,60 @@ add_library(nvim-test MODULE EXCLUDE_FROM_ALL ${NVIM_GENERATED_FOR_SOURCES} ${NV
target_link_libraries(nvim-test ${NVIM_LINK_LIBRARIES})
set_property(TARGET nvim-test APPEND_STRING PROPERTY COMPILE_FLAGS -DUNIT_TESTING)
-set(NO_SINGLE_CHECK_HEADERS
- cursor_shape
- diff
- digraph
- ex_cmds
- ex_getln
- file_search
- fold
- getchar
- hardcopy
- if_cscope
- if_cscope_defs
- mark
- mbyte
- memfile_defs
- memline
- memline_defs
- menu
- misc2
- move
- msgpack_rpc/server
- ops
- option
- os/shell
- os_unix
- os/win_defs
- popupmnu
- quickfix
- regexp
- regexp_defs
- screen
- search
- sha256
- sign_defs
- spell
- spellfile
- syntax
- syntax_defs
- tag
- terminal
- tui/tui
- ugrid
- ui
- ui_bridge
- undo
- undo_defs
- version
- window
-)
-foreach(hfile ${NVIM_HEADERS})
- get_filename_component(full_d ${hfile} PATH)
+function(get_test_target prefix sfile relative_path_var target_var)
+ get_filename_component(full_d "${sfile}" PATH)
file(RELATIVE_PATH d "${PROJECT_SOURCE_DIR}/src/nvim" "${full_d}")
- if(${d} MATCHES "^[.][.]")
+ if(d MATCHES "^[.][.]")
file(RELATIVE_PATH d "${GENERATED_DIR}" "${full_d}")
endif()
- get_filename_component(r ${hfile} NAME_WE)
- if(NOT ${d} EQUAL ".")
+ get_filename_component(r "${sfile}" NAME)
+ if(NOT d MATCHES "^[.]?$")
set(r "${d}/${r}")
endif()
+ string(REGEX REPLACE "[/.]" "-" suffix "${r}")
+ set(${relative_path_var} ${r} PARENT_SCOPE)
+ if(prefix STREQUAL "")
+ set(${target_var} "${suffix}" PARENT_SCOPE)
+ else()
+ set(${target_var} "${prefix}-${suffix}" PARENT_SCOPE)
+ endif()
+endfunction()
+
+set(NO_SINGLE_CHECK_HEADERS
+ if_cscope_defs.h
+ misc2.h
+ msgpack_rpc/server.h
+ option.h
+ os/shell.h
+ os_unix.h
+ os/win_defs.h
+ popupmnu.h
+ quickfix.h
+ regexp.h
+ regexp_defs.h
+ sha256.h
+ sign_defs.h
+ spell.h
+ spellfile.h
+ syntax_defs.h
+ tag.h
+ terminal.h
+ tui/tui.h
+ undo.h
+ undo_defs.h
+)
+foreach(hfile ${NVIM_HEADERS})
+ get_test_target(test-includes "${hfile}" relative_path texe)
if(NOT ${hfile} MATCHES "[.]c[.]h$")
- set(tsource "${GENERATED_DIR}/${r}.test-include.c")
- string(REPLACE "/" "-" texe "test-incl-${r}")
+ set(tsource "${GENERATED_DIR}/${relative_path}.test-include.c")
write_file("${tsource}" "#include \"${hfile}\"\nint main(int argc, char **argv) { return 0; }")
add_executable(
${texe}
EXCLUDE_FROM_ALL
${tsource} ${NVIM_HEADERS} ${NVIM_GENERATED_FOR_HEADERS})
- list(FIND NO_SINGLE_CHECK_HEADERS "${r}" hfile_exclude_idx)
+ list(FIND NO_SINGLE_CHECK_HEADERS "${relative_path}" hfile_exclude_idx)
if(${hfile_exclude_idx} EQUAL -1)
list(APPEND HEADER_CHECK_TARGETS ${texe})
endif()
@@ -470,4 +470,60 @@ foreach(hfile ${NVIM_HEADERS})
endforeach()
add_custom_target(check-single-includes DEPENDS ${HEADER_CHECK_TARGETS})
+function(add_download output url allow_failure)
+ add_custom_command(
+ OUTPUT "${output}"
+ COMMAND
+ ${CMAKE_COMMAND}
+ -DURL=${url} -DFILE=${output}
+ -DALLOW_FAILURE=${allow_failure}
+ -P ${DOWNLOAD_SCRIPT}
+ DEPENDS ${DOWNLOAD_SCRIPT}
+ )
+endfunction()
+
+add_download(${LINT_SUPPRESSES_ARCHIVE} ${LINT_SUPPRESSES_URL} off)
+
+add_custom_command(
+ OUTPUT ${LINT_SUPPRESSES_TOUCH_FILE}
+ WORKING_DIRECTORY ${LINT_SUPPRESSES_ROOT}/src
+ COMMAND ${CMAKE_COMMAND} -E tar xfz ${LINT_SUPPRESSES_ARCHIVE}
+ COMMAND
+ ${CMAKE_COMMAND}
+ -DTARGET=${LINT_SUPPRESSES_ROOT}
+ -P ${LINT_SUPPRESSES_INSTALL_SCRIPT}
+ COMMAND ${CMAKE_COMMAND} -E touch ${LINT_SUPPRESSES_TOUCH_FILE}
+ DEPENDS
+ ${LINT_SUPPRESSES_ARCHIVE} ${LINT_SUPPRESSES_INSTALL_SCRIPT}
+)
+
+add_download(${LINT_SUPPRESS_FILE} ${LINT_SUPPRESS_URL} off)
+
+set(LINT_NVIM_REL_SOURCES)
+foreach(sfile ${LINT_NVIM_SOURCES})
+ get_test_target("" "${sfile}" r suffix)
+ set(suppress_file ${LINT_SUPPRESSES_ROOT}/${suffix}.json)
+ set(suppress_url "${LINT_SUPPRESS_URL_BASE}/${suffix}.json")
+ set(rsfile src/nvim/${r})
+ set(touch_file "${TOUCHES_DIR}/ran-clint-${suffix}")
+ add_custom_command(
+ OUTPUT ${touch_file}
+ COMMAND ${LINT_PRG} --suppress-errors=${suppress_file} ${rsfile}
+ WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
+ COMMAND ${CMAKE_COMMAND} -E touch ${touch_file}
+ DEPENDS ${LINT_PRG} ${sfile} ${LINT_SUPPRESSES_TOUCH_FILE}
+ )
+ list(APPEND LINT_TARGETS ${touch_file})
+ list(APPEND LINT_NVIM_REL_SOURCES ${rsfile})
+endforeach()
+add_custom_target(clint DEPENDS ${LINT_TARGETS})
+
+add_custom_target(
+ clint-full
+ COMMAND
+ ${LINT_PRG} --suppress-errors=${LINT_SUPPRESS_FILE} ${LINT_NVIM_REL_SOURCES}
+ WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
+ DEPENDS ${LINT_PRG} ${LINT_NVIM_SOURCES} ${LINT_SUPPRESS_FILE}
+)
+
add_subdirectory(po)
diff --git a/src/nvim/api/buffer.c b/src/nvim/api/buffer.c
index 26f9a6f592..ae5728ee21 100644
--- a/src/nvim/api/buffer.c
+++ b/src/nvim/api/buffer.c
@@ -1,3 +1,6 @@
+// This is an open source non-commercial project. Dear PVS-Studio, please check
+// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
+
// Much of this code was adapted from 'if_py_both.h' from the original
// vim source
#include <stdbool.h>
@@ -62,7 +65,7 @@ String buffer_get_line(Buffer buffer, Integer index, Error *err)
index = convert_index(index);
Array slice = nvim_buf_get_lines(0, buffer, index, index+1, true, err);
- if (!err->set && slice.size) {
+ if (!ERROR_SET(err) && slice.size) {
rv = slice.items[0].data.string;
}
@@ -168,7 +171,7 @@ ArrayOf(String) nvim_buf_get_lines(uint64_t channel_id,
end = normalize_index(buf, end, &oob);
if (strict_indexing && oob) {
- api_set_error(err, Validation, _("Index out of bounds"));
+ api_set_error(err, kErrorTypeValidation, "Index out of bounds");
return rv;
}
@@ -184,7 +187,7 @@ ArrayOf(String) nvim_buf_get_lines(uint64_t channel_id,
int64_t lnum = start + (int64_t)i;
if (lnum > LONG_MAX) {
- api_set_error(err, Validation, _("Line index is too high"));
+ api_set_error(err, kErrorTypeValidation, "Line index is too high");
goto end;
}
@@ -200,7 +203,7 @@ ArrayOf(String) nvim_buf_get_lines(uint64_t channel_id,
}
end:
- if (err->set) {
+ if (ERROR_SET(err)) {
for (size_t i = 0; i < rv.size; i++) {
xfree(rv.items[i].data.string.data);
}
@@ -280,15 +283,15 @@ void nvim_buf_set_lines(uint64_t channel_id,
end = normalize_index(buf, end, &oob);
if (strict_indexing && oob) {
- api_set_error(err, Validation, _("Index out of bounds"));
+ api_set_error(err, kErrorTypeValidation, "Index out of bounds");
return;
}
if (start > end) {
api_set_error(err,
- Validation,
- _("Argument \"start\" is higher than \"end\""));
+ kErrorTypeValidation,
+ "Argument \"start\" is higher than \"end\"");
return;
}
@@ -302,8 +305,8 @@ void nvim_buf_set_lines(uint64_t channel_id,
for (size_t i = 0; i < new_len; i++) {
if (replacement.items[i].type != kObjectTypeString) {
api_set_error(err,
- Validation,
- _("All items in the replacement array must be strings"));
+ kErrorTypeValidation,
+ "All items in the replacement array must be strings");
goto end;
}
@@ -314,7 +317,8 @@ void nvim_buf_set_lines(uint64_t channel_id,
lines[i] = xmallocz(l.size);
for (size_t j = 0; j < l.size; j++) {
if (l.data[j] == '\n' && channel_id != INTERNAL_CALL) {
- api_set_error(err, Exception, _("string cannot contain newlines"));
+ api_set_error(err, kErrorTypeException,
+ "String cannot contain newlines");
new_len = i + 1;
goto end;
}
@@ -327,7 +331,7 @@ void nvim_buf_set_lines(uint64_t channel_id,
switch_to_win_for_buf(buf, &save_curwin, &save_curtab, &save_curbuf);
if (u_save((linenr_T)(start - 1), (linenr_T)end) == FAIL) {
- api_set_error(err, Exception, _("Failed to save undo information"));
+ api_set_error(err, kErrorTypeException, "Failed to save undo information");
goto end;
}
@@ -337,7 +341,7 @@ void nvim_buf_set_lines(uint64_t channel_id,
size_t to_delete = (new_len < old_len) ? (size_t)(old_len - new_len) : 0;
for (size_t i = 0; i < to_delete; i++) {
if (ml_delete((linenr_T)start, false) == FAIL) {
- api_set_error(err, Exception, _("Failed to delete line"));
+ api_set_error(err, kErrorTypeException, "Failed to delete line");
goto end;
}
}
@@ -354,12 +358,12 @@ void nvim_buf_set_lines(uint64_t channel_id,
int64_t lnum = start + (int64_t)i;
if (lnum > LONG_MAX) {
- api_set_error(err, Validation, _("Index value is too high"));
+ api_set_error(err, kErrorTypeValidation, "Index value is too high");
goto end;
}
if (ml_replace((linenr_T)lnum, (char_u *)lines[i], false) == FAIL) {
- api_set_error(err, Exception, _("Failed to replace line"));
+ api_set_error(err, kErrorTypeException, "Failed to replace line");
goto end;
}
// Mark lines that haven't been passed to the buffer as they need
@@ -372,12 +376,12 @@ void nvim_buf_set_lines(uint64_t channel_id,
int64_t lnum = start + (int64_t)i - 1;
if (lnum > LONG_MAX) {
- api_set_error(err, Validation, _("Index value is too high"));
+ api_set_error(err, kErrorTypeValidation, "Index value is too high");
goto end;
}
if (ml_append((linenr_T)lnum, (char_u *)lines[i], 0, false) == FAIL) {
- api_set_error(err, Exception, _("Failed to insert line"));
+ api_set_error(err, kErrorTypeException, "Failed to insert line");
goto end;
}
@@ -624,7 +628,7 @@ void nvim_buf_set_name(Buffer buffer, String name, Error *err)
}
if (ren_ret == FAIL) {
- api_set_error(err, Exception, _("Failed to rename buffer"));
+ api_set_error(err, kErrorTypeException, "Failed to rename buffer");
}
}
@@ -636,7 +640,9 @@ Boolean nvim_buf_is_valid(Buffer buffer)
FUNC_API_SINCE(1)
{
Error stub = ERROR_INIT;
- return find_buffer_by_handle(buffer, &stub) != NULL;
+ Boolean ret = find_buffer_by_handle(buffer, &stub) != NULL;
+ api_clear_error(&stub);
+ return ret;
}
/// Inserts a sequence of lines to a buffer at a certain index
@@ -675,7 +681,8 @@ ArrayOf(Integer, 2) nvim_buf_get_mark(Buffer buffer, String name, Error *err)
}
if (name.size != 1) {
- api_set_error(err, Validation, _("Mark name must be a single character"));
+ api_set_error(err, kErrorTypeValidation,
+ "Mark name must be a single character");
return rv;
}
@@ -693,7 +700,7 @@ ArrayOf(Integer, 2) nvim_buf_get_mark(Buffer buffer, String name, Error *err)
}
if (posp == NULL) {
- api_set_error(err, Validation, _("Invalid mark name"));
+ api_set_error(err, kErrorTypeValidation, "Invalid mark name");
return rv;
}
@@ -748,11 +755,11 @@ Integer nvim_buf_add_highlight(Buffer buffer,
}
if (line < 0 || line >= MAXLNUM) {
- api_set_error(err, Validation, _("Line number outside range"));
+ api_set_error(err, kErrorTypeValidation, "Line number outside range");
return 0;
}
if (col_start < 0 || col_start > MAXCOL) {
- api_set_error(err, Validation, _("Column value outside range"));
+ api_set_error(err, kErrorTypeValidation, "Column value outside range");
return 0;
}
if (col_end < 0 || col_end > MAXCOL) {
@@ -789,7 +796,7 @@ void nvim_buf_clear_highlight(Buffer buffer,
}
if (line_start < 0 || line_start >= MAXLNUM) {
- api_set_error(err, Validation, _("Line number outside range"));
+ api_set_error(err, kErrorTypeValidation, "Line number outside range");
return;
}
if (line_end < 0 || line_end > MAXLNUM) {
diff --git a/src/nvim/api/private/defs.h b/src/nvim/api/private/defs.h
index 223aab09dc..60bf38265f 100644
--- a/src/nvim/api/private/defs.h
+++ b/src/nvim/api/private/defs.h
@@ -8,9 +8,11 @@
#define ARRAY_DICT_INIT {.size = 0, .capacity = 0, .items = NULL}
#define STRING_INIT {.data = NULL, .size = 0}
#define OBJECT_INIT { .type = kObjectTypeNil }
-#define ERROR_INIT { .set = false }
+#define ERROR_INIT { .type = kErrorTypeNone, .msg = NULL }
#define REMOTE_TYPE(type) typedef handle_T type
+#define ERROR_SET(e) ((e)->type != kErrorTypeNone)
+
#ifdef INCLUDE_GENERATED_DECLARATIONS
# define ArrayOf(...) Array
# define DictionaryOf(...) Dictionary
@@ -20,6 +22,7 @@ typedef int handle_T;
// Basic types
typedef enum {
+ kErrorTypeNone = -1,
kErrorTypeException,
kErrorTypeValidation
} ErrorType;
@@ -38,8 +41,7 @@ typedef enum {
typedef struct {
ErrorType type;
- char msg[1024];
- bool set;
+ char *msg;
} Error;
typedef bool Boolean;
diff --git a/src/nvim/api/private/dispatch.c b/src/nvim/api/private/dispatch.c
index 9b3bcc380a..f8eebcdb10 100644
--- a/src/nvim/api/private/dispatch.c
+++ b/src/nvim/api/private/dispatch.c
@@ -1,3 +1,6 @@
+// This is an open source non-commercial project. Dear PVS-Studio, please check
+// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
+
#include <inttypes.h>
#include <stdbool.h>
#include <stdint.h>
diff --git a/src/nvim/api/private/handle.c b/src/nvim/api/private/handle.c
index acb0fb332a..eb96192af2 100644
--- a/src/nvim/api/private/handle.c
+++ b/src/nvim/api/private/handle.c
@@ -1,3 +1,6 @@
+// This is an open source non-commercial project. Dear PVS-Studio, please check
+// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
+
#include <assert.h>
#include <stdint.h>
diff --git a/src/nvim/api/private/helpers.c b/src/nvim/api/private/helpers.c
index fe15b28041..69cb19c14f 100644
--- a/src/nvim/api/private/helpers.c
+++ b/src/nvim/api/private/helpers.c
@@ -1,3 +1,6 @@
+// This is an open source non-commercial project. Dear PVS-Studio, please check
+// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
+
#include <assert.h>
#include <inttypes.h>
#include <stdbool.h>
@@ -58,7 +61,7 @@ bool try_end(Error *err)
discard_current_exception();
}
- api_set_error(err, Exception, _("Keyboard interrupt"));
+ api_set_error(err, kErrorTypeException, "Keyboard interrupt");
got_int = false;
} else if (msg_list != NULL && *msg_list != NULL) {
int should_free;
@@ -66,19 +69,18 @@ bool try_end(Error *err)
ET_ERROR,
NULL,
&should_free);
- xstrlcpy(err->msg, msg, sizeof(err->msg));
- err->set = true;
+ api_set_error(err, kErrorTypeException, "%s", msg);
free_global_msglist();
if (should_free) {
xfree(msg);
}
} else if (did_throw) {
- api_set_error(err, Exception, "%s", current_exception->value);
+ api_set_error(err, kErrorTypeException, "%s", current_exception->value);
discard_current_exception();
}
- return err->set;
+ return ERROR_SET(err);
}
/// Recursively expands a vimscript value in a dict
@@ -91,8 +93,8 @@ Object dict_get_value(dict_T *dict, String key, Error *err)
dictitem_T *const di = tv_dict_find(dict, key.data, (ptrdiff_t)key.size);
if (di == NULL) {
- api_set_error(err, Validation, _("Key not found"));
- return (Object) OBJECT_INIT;
+ api_set_error(err, kErrorTypeValidation, "Key not found");
+ return (Object)OBJECT_INIT;
}
return vim_to_object(&di->di_tv);
@@ -115,17 +117,18 @@ Object dict_set_var(dict_T *dict, String key, Object value, bool del,
Object rv = OBJECT_INIT;
if (dict->dv_lock) {
- api_set_error(err, Exception, _("Dictionary is locked"));
+ api_set_error(err, kErrorTypeException, "Dictionary is locked");
return rv;
}
if (key.size == 0) {
- api_set_error(err, Validation, _("Empty variable names aren't allowed"));
+ api_set_error(err, kErrorTypeValidation,
+ "Empty variable names aren't allowed");
return rv;
}
if (key.size > INT_MAX) {
- api_set_error(err, Validation, _("Key length is too high"));
+ api_set_error(err, kErrorTypeValidation, "Key length is too high");
return rv;
}
@@ -133,13 +136,13 @@ Object dict_set_var(dict_T *dict, String key, Object value, bool del,
if (di != NULL) {
if (di->di_flags & DI_FLAGS_RO) {
- api_set_error(err, Exception, _("Key is read-only: %s"), key.data);
+ api_set_error(err, kErrorTypeException, "Key is read-only: %s", key.data);
return rv;
} else if (di->di_flags & DI_FLAGS_FIX) {
- api_set_error(err, Exception, _("Key is fixed: %s"), key.data);
+ api_set_error(err, kErrorTypeException, "Key is fixed: %s", key.data);
return rv;
} else if (di->di_flags & DI_FLAGS_LOCK) {
- api_set_error(err, Exception, _("Key is locked: %s"), key.data);
+ api_set_error(err, kErrorTypeException, "Key is locked: %s", key.data);
return rv;
}
}
@@ -148,7 +151,8 @@ Object dict_set_var(dict_T *dict, String key, Object value, bool del,
// Delete the key
if (di == NULL) {
// Doesn't exist, fail
- api_set_error(err, Validation, _("Key \"%s\" doesn't exist"), key.data);
+ api_set_error(err, kErrorTypeValidation, "Key does not exist: %s",
+ key.data);
} else {
// Return the old value
if (retval) {
@@ -200,7 +204,7 @@ Object get_option_from(void *from, int type, String name, Error *err)
Object rv = OBJECT_INIT;
if (name.size == 0) {
- api_set_error(err, Validation, _("Empty option name"));
+ api_set_error(err, kErrorTypeValidation, "Empty option name");
return rv;
}
@@ -212,8 +216,8 @@ Object get_option_from(void *from, int type, String name, Error *err)
if (!flags) {
api_set_error(err,
- Validation,
- _("Invalid option name \"%s\""),
+ kErrorTypeValidation,
+ "Invalid option name \"%s\"",
name.data);
return rv;
}
@@ -231,14 +235,14 @@ Object get_option_from(void *from, int type, String name, Error *err)
rv.data.string.size = strlen(stringval);
} else {
api_set_error(err,
- Exception,
- _("Unable to get value for option \"%s\""),
+ kErrorTypeException,
+ "Unable to get value for option \"%s\"",
name.data);
}
} else {
api_set_error(err,
- Exception,
- _("Unknown type for option \"%s\""),
+ kErrorTypeException,
+ "Unknown type for option \"%s\"",
name.data);
}
@@ -255,7 +259,7 @@ Object get_option_from(void *from, int type, String name, Error *err)
void set_option_to(void *to, int type, String name, Object value, Error *err)
{
if (name.size == 0) {
- api_set_error(err, Validation, _("Empty option name"));
+ api_set_error(err, kErrorTypeValidation, "Empty option name");
return;
}
@@ -263,8 +267,8 @@ void set_option_to(void *to, int type, String name, Object value, Error *err)
if (flags == 0) {
api_set_error(err,
- Validation,
- _("Invalid option name \"%s\""),
+ kErrorTypeValidation,
+ "Invalid option name \"%s\"",
name.data);
return;
}
@@ -272,15 +276,15 @@ void set_option_to(void *to, int type, String name, Object value, Error *err)
if (value.type == kObjectTypeNil) {
if (type == SREQ_GLOBAL) {
api_set_error(err,
- Exception,
- _("Unable to unset option \"%s\""),
+ kErrorTypeException,
+ "Unable to unset option \"%s\"",
name.data);
return;
} else if (!(flags & SOPT_GLOBAL)) {
api_set_error(err,
- Exception,
- _("Cannot unset option \"%s\" "
- "because it doesn't have a global value"),
+ kErrorTypeException,
+ "Cannot unset option \"%s\" "
+ "because it doesn't have a global value",
name.data);
return;
} else {
@@ -294,8 +298,8 @@ void set_option_to(void *to, int type, String name, Object value, Error *err)
if (flags & SOPT_BOOL) {
if (value.type != kObjectTypeBoolean) {
api_set_error(err,
- Validation,
- _("Option \"%s\" requires a boolean value"),
+ kErrorTypeValidation,
+ "Option \"%s\" requires a boolean value",
name.data);
return;
}
@@ -305,16 +309,16 @@ void set_option_to(void *to, int type, String name, Object value, Error *err)
} else if (flags & SOPT_NUM) {
if (value.type != kObjectTypeInteger) {
api_set_error(err,
- Validation,
- _("Option \"%s\" requires an integer value"),
+ kErrorTypeValidation,
+ "Option \"%s\" requires an integer value",
name.data);
return;
}
if (value.data.integer > INT_MAX || value.data.integer < INT_MIN) {
api_set_error(err,
- Validation,
- _("Value for option \"%s\" is outside range"),
+ kErrorTypeValidation,
+ "Value for option \"%s\" is outside range",
name.data);
return;
}
@@ -324,8 +328,8 @@ void set_option_to(void *to, int type, String name, Object value, Error *err)
} else {
if (value.type != kObjectTypeString) {
api_set_error(err,
- Validation,
- _("Option \"%s\" requires a string value"),
+ kErrorTypeValidation,
+ "Option \"%s\" requires a string value",
name.data);
return;
}
@@ -558,13 +562,13 @@ buf_T *find_buffer_by_handle(Buffer buffer, Error *err)
buf_T *rv = handle_get_buffer(buffer);
if (!rv) {
- api_set_error(err, Validation, _("Invalid buffer id"));
+ api_set_error(err, kErrorTypeValidation, "Invalid buffer id");
}
return rv;
}
-win_T * find_window_by_handle(Window window, Error *err)
+win_T *find_window_by_handle(Window window, Error *err)
{
if (window == 0) {
return curwin;
@@ -573,13 +577,13 @@ win_T * find_window_by_handle(Window window, Error *err)
win_T *rv = handle_get_window(window);
if (!rv) {
- api_set_error(err, Validation, _("Invalid window id"));
+ api_set_error(err, kErrorTypeValidation, "Invalid window id");
}
return rv;
}
-tabpage_T * find_tab_by_handle(Tabpage tabpage, Error *err)
+tabpage_T *find_tab_by_handle(Tabpage tabpage, Error *err)
{
if (tabpage == 0) {
return curtab;
@@ -588,7 +592,7 @@ tabpage_T * find_tab_by_handle(Tabpage tabpage, Error *err)
tabpage_T *rv = handle_get_tabpage(tabpage);
if (!rv) {
- api_set_error(err, Validation, _("Invalid tabpage id"));
+ api_set_error(err, kErrorTypeValidation, "Invalid tabpage id");
}
return rv;
@@ -656,7 +660,7 @@ bool object_to_vim(Object obj, typval_T *tv, Error *err)
case kObjectTypeInteger:
if (obj.data.integer > VARNUMBER_MAX
|| obj.data.integer < VARNUMBER_MIN) {
- api_set_error(err, Validation, _("Integer value outside range"));
+ api_set_error(err, kErrorTypeValidation, "Integer value outside range");
return false;
}
@@ -710,8 +714,8 @@ bool object_to_vim(Object obj, typval_T *tv, Error *err)
String key = item.key;
if (key.size == 0) {
- api_set_error(err, Validation,
- _("Empty dictionary keys aren't allowed"));
+ api_set_error(err, kErrorTypeValidation,
+ "Empty dictionary keys aren't allowed");
// cleanup
tv_dict_free(dict);
return false;
@@ -798,6 +802,17 @@ void api_free_dictionary(Dictionary value)
xfree(value.items);
}
+void api_clear_error(Error *value)
+ FUNC_ATTR_NONNULL_ALL
+{
+ if (!ERROR_SET(value)) {
+ return;
+ }
+ xfree(value->msg);
+ value->msg = NULL;
+ value->type = kErrorTypeNone;
+}
+
Dictionary api_metadata(void)
{
static Dictionary metadata = ARRAY_DICT_INIT;
@@ -924,8 +939,8 @@ static void set_option_value_for(char *key,
return;
}
api_set_error(err,
- Exception,
- _("Problem while switching windows"));
+ kErrorTypeException,
+ "Problem while switching windows");
return;
}
set_option_value_err(key, numval, stringval, opt_flags, err);
@@ -941,7 +956,7 @@ static void set_option_value_for(char *key,
break;
}
- if (err->set) {
+ if (ERROR_SET(err)) {
return;
}
@@ -962,6 +977,26 @@ static void set_option_value_err(char *key,
return;
}
- api_set_error(err, Exception, "%s", errmsg);
+ api_set_error(err, kErrorTypeException, "%s", errmsg);
}
}
+
+void api_set_error(Error *err, ErrorType errType, const char *format, ...)
+ FUNC_ATTR_NONNULL_ALL
+{
+ assert(kErrorTypeNone != errType);
+ va_list args1;
+ va_list args2;
+ va_start(args1, format);
+ va_copy(args2, args1);
+ int len = vsnprintf(NULL, 0, format, args1);
+ va_end(args1);
+ assert(len >= 0);
+ // Limit error message to 1 MB.
+ size_t bufsize = MIN((size_t)len + 1, 1024 * 1024);
+ err->msg = xmalloc(bufsize);
+ vsnprintf(err->msg, bufsize, format, args2);
+ va_end(args2);
+
+ err->type = errType;
+}
diff --git a/src/nvim/api/private/helpers.h b/src/nvim/api/private/helpers.h
index 9fe8c351cf..681945ac9c 100644
--- a/src/nvim/api/private/helpers.h
+++ b/src/nvim/api/private/helpers.h
@@ -8,15 +8,6 @@
#include "nvim/memory.h"
#include "nvim/lib/kvec.h"
-#define api_set_error(err, errtype, ...) \
- do { \
- snprintf((err)->msg, \
- sizeof((err)->msg), \
- __VA_ARGS__); \
- (err)->set = true; \
- (err)->type = kErrorType##errtype; \
- } while (0)
-
#define OBJECT_OBJ(o) o
#define BOOLEAN_OBJ(b) ((Object) { \
diff --git a/src/nvim/api/tabpage.c b/src/nvim/api/tabpage.c
index 0f0c33f621..6f2f9e1d2a 100644
--- a/src/nvim/api/tabpage.c
+++ b/src/nvim/api/tabpage.c
@@ -1,3 +1,6 @@
+// This is an open source non-commercial project. Dear PVS-Studio, please check
+// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
+
#include <stdbool.h>
#include <stdint.h>
#include <stdlib.h>
@@ -190,6 +193,8 @@ Boolean nvim_tabpage_is_valid(Tabpage tabpage)
FUNC_API_SINCE(1)
{
Error stub = ERROR_INIT;
- return find_tab_by_handle(tabpage, &stub) != NULL;
+ Boolean ret = find_tab_by_handle(tabpage, &stub) != NULL;
+ api_clear_error(&stub);
+ return ret;
}
diff --git a/src/nvim/api/ui.c b/src/nvim/api/ui.c
index 625bcc6b4b..f0da0d1812 100644
--- a/src/nvim/api/ui.c
+++ b/src/nvim/api/ui.c
@@ -1,3 +1,6 @@
+// This is an open source non-commercial project. Dear PVS-Studio, please check
+// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
+
#include <assert.h>
#include <stddef.h>
#include <stdint.h>
@@ -12,6 +15,7 @@
#include "nvim/api/private/defs.h"
#include "nvim/api/private/helpers.h"
#include "nvim/popupmnu.h"
+#include "nvim/cursor_shape.h"
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "api/ui.c.generated.h"
@@ -51,13 +55,13 @@ void nvim_ui_attach(uint64_t channel_id, Integer width, Integer height,
FUNC_API_SINCE(1) FUNC_API_NOEVAL
{
if (pmap_has(uint64_t)(connected_uis, channel_id)) {
- api_set_error(err, Exception, _("UI already attached for channel"));
+ api_set_error(err, kErrorTypeException, "UI already attached for channel");
return;
}
if (width <= 0 || height <= 0) {
- api_set_error(err, Validation,
- _("Expected width > 0 and height > 0"));
+ api_set_error(err, kErrorTypeValidation,
+ "Expected width > 0 and height > 0");
return;
}
UI *ui = xcalloc(1, sizeof(UI));
@@ -69,6 +73,7 @@ void nvim_ui_attach(uint64_t channel_id, Integer width, Integer height,
ui->clear = remote_ui_clear;
ui->eol_clear = remote_ui_eol_clear;
ui->cursor_goto = remote_ui_cursor_goto;
+ ui->mode_info_set = remote_ui_mode_info_set;
ui->update_menu = remote_ui_update_menu;
ui->busy_start = remote_ui_busy_start;
ui->busy_stop = remote_ui_busy_stop;
@@ -92,7 +97,7 @@ void nvim_ui_attach(uint64_t channel_id, Integer width, Integer height,
for (size_t i = 0; i < options.size; i++) {
ui_set_option(ui, options.items[i].key, options.items[i].value, err);
- if (err->set) {
+ if (ERROR_SET(err)) {
xfree(ui);
return;
}
@@ -121,7 +126,7 @@ void nvim_ui_detach(uint64_t channel_id, Error *err)
FUNC_API_SINCE(1) FUNC_API_NOEVAL
{
if (!pmap_has(uint64_t)(connected_uis, channel_id)) {
- api_set_error(err, Exception, _("UI is not attached for channel"));
+ api_set_error(err, kErrorTypeException, "UI is not attached for channel");
return;
}
remote_ui_disconnect(channel_id);
@@ -133,13 +138,13 @@ void nvim_ui_try_resize(uint64_t channel_id, Integer width,
FUNC_API_SINCE(1) FUNC_API_NOEVAL
{
if (!pmap_has(uint64_t)(connected_uis, channel_id)) {
- api_set_error(err, Exception, _("UI is not attached for channel"));
+ api_set_error(err, kErrorTypeException, "UI is not attached for channel");
return;
}
if (width <= 0 || height <= 0) {
- api_set_error(err, Validation,
- _("Expected width > 0 and height > 0"));
+ api_set_error(err, kErrorTypeValidation,
+ "Expected width > 0 and height > 0");
return;
}
@@ -154,13 +159,13 @@ void nvim_ui_set_option(uint64_t channel_id, String name,
FUNC_API_SINCE(1) FUNC_API_NOEVAL
{
if (!pmap_has(uint64_t)(connected_uis, channel_id)) {
- api_set_error(error, Exception, _("UI is not attached for channel"));
+ api_set_error(error, kErrorTypeException, "UI is not attached for channel");
return;
}
UI *ui = pmap_get(uint64_t)(connected_uis, channel_id);
ui_set_option(ui, name, value, error);
- if (!error->set) {
+ if (!ERROR_SET(error)) {
ui_refresh();
}
}
@@ -168,19 +173,19 @@ void nvim_ui_set_option(uint64_t channel_id, String name,
static void ui_set_option(UI *ui, String name, Object value, Error *error) {
if (strcmp(name.data, "rgb") == 0) {
if (value.type != kObjectTypeBoolean) {
- api_set_error(error, Validation, _("rgb must be a Boolean"));
+ api_set_error(error, kErrorTypeValidation, "rgb must be a Boolean");
return;
}
ui->rgb = value.data.boolean;
} else if (strcmp(name.data, "popupmenu_external") == 0) {
if (value.type != kObjectTypeBoolean) {
- api_set_error(error, Validation,
- _("popupmenu_external must be a Boolean"));
+ api_set_error(error, kErrorTypeValidation,
+ "popupmenu_external must be a Boolean");
return;
}
ui->pum_external = value.data.boolean;
} else {
- api_set_error(error, Validation, _("No such ui option"));
+ api_set_error(error, kErrorTypeValidation, "No such ui option");
}
}
@@ -264,19 +269,14 @@ static void remote_ui_mouse_off(UI *ui)
push_call(ui, "mouse_off", args);
}
-static void remote_ui_mode_change(UI *ui, int mode)
+static void remote_ui_mode_change(UI *ui, int mode_idx)
{
Array args = ARRAY_DICT_INIT;
- if (mode == INSERT) {
- ADD(args, STRING_OBJ(cstr_to_string("insert")));
- } else if (mode == REPLACE) {
- ADD(args, STRING_OBJ(cstr_to_string("replace")));
- } else if (mode == CMDLINE) {
- ADD(args, STRING_OBJ(cstr_to_string("cmdline")));
- } else {
- assert(mode == NORMAL);
- ADD(args, STRING_OBJ(cstr_to_string("normal")));
- }
+
+ char *full_name = shape_table[mode_idx].full_name;
+ ADD(args, STRING_OBJ(cstr_to_string(full_name)));
+
+ ADD(args, INTEGER_OBJ(mode_idx));
push_call(ui, "mode_change", args);
}
@@ -298,6 +298,14 @@ static void remote_ui_scroll(UI *ui, int count)
push_call(ui, "scroll", args);
}
+static void remote_ui_mode_info_set(UI *ui, bool guicursor_enabled, Array data)
+{
+ Array args = ARRAY_DICT_INIT;
+ ADD(args, BOOLEAN_OBJ(guicursor_enabled));
+ ADD(args, copy_object(ARRAY_OBJ(data)));
+ push_call(ui, "mode_info_set", args);
+}
+
static void remote_ui_highlight_set(UI *ui, HlAttrs attrs)
{
Array args = ARRAY_DICT_INIT;
@@ -383,8 +391,10 @@ static void remote_ui_update_sp(UI *ui, int sp)
static void remote_ui_flush(UI *ui)
{
UIData *data = ui->data;
- channel_send_event(data->channel_id, "redraw", data->buffer);
- data->buffer = (Array)ARRAY_DICT_INIT;
+ if (data->buffer.size > 0) {
+ channel_send_event(data->channel_id, "redraw", data->buffer);
+ data->buffer = (Array)ARRAY_DICT_INIT;
+ }
}
static void remote_ui_suspend(UI *ui)
diff --git a/src/nvim/api/vim.c b/src/nvim/api/vim.c
index 6926436d2f..da00fbc6e3 100644
--- a/src/nvim/api/vim.c
+++ b/src/nvim/api/vim.c
@@ -1,3 +1,6 @@
+// This is an open source non-commercial project. Dear PVS-Studio, please check
+// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
+
#include <assert.h>
#include <stdint.h>
#include <inttypes.h>
@@ -162,8 +165,8 @@ String nvim_command_output(String str, Error *err)
nvim_command(str, err);
do_cmdline_cmd("redir END");
- if (err->set) {
- return (String) STRING_INIT;
+ if (ERROR_SET(err)) {
+ return (String)STRING_INIT;
}
return cstr_to_string((char *)get_vim_var_str(VV_COMMAND_OUTPUT));
@@ -185,7 +188,7 @@ Object nvim_eval(String expr, Error *err)
typval_T rettv;
if (eval0((char_u *)expr.data, &rettv, NULL, true) == FAIL) {
- api_set_error(err, Exception, "Failed to evaluate expression");
+ api_set_error(err, kErrorTypeException, "Failed to evaluate expression");
}
if (!try_end(err)) {
@@ -211,8 +214,8 @@ Object nvim_call_function(String fname, Array args, Error *err)
{
Object rv = OBJECT_INIT;
if (args.size > MAX_FUNC_ARGS) {
- api_set_error(err, Validation,
- _("Function called with too many arguments."));
+ api_set_error(err, kErrorTypeValidation,
+ "Function called with too many arguments.");
return rv;
}
@@ -234,7 +237,7 @@ Object nvim_call_function(String fname, Array args, Error *err)
curwin->w_cursor.lnum, curwin->w_cursor.lnum, &dummy,
true, NULL, NULL);
if (r == FAIL) {
- api_set_error(err, Exception, _("Error calling function."));
+ api_set_error(err, kErrorTypeException, "Error calling function.");
}
if (!try_end(err)) {
rv = vim_to_object(&rettv);
@@ -259,7 +262,7 @@ Integer nvim_strwidth(String str, Error *err)
FUNC_API_SINCE(1)
{
if (str.size > INT_MAX) {
- api_set_error(err, Validation, _("String length is too high"));
+ api_set_error(err, kErrorTypeValidation, "String length is too high");
return 0;
}
@@ -315,7 +318,7 @@ void nvim_set_current_dir(String dir, Error *err)
FUNC_API_SINCE(1)
{
if (dir.size >= MAXPATHL) {
- api_set_error(err, Validation, _("Directory string is too long"));
+ api_set_error(err, kErrorTypeValidation, "Directory string is too long");
return;
}
@@ -327,7 +330,7 @@ void nvim_set_current_dir(String dir, Error *err)
if (vim_chdir((char_u *)string, kCdScopeGlobal)) {
if (!try_end(err)) {
- api_set_error(err, Exception, _("Failed to change directory"));
+ api_set_error(err, kErrorTypeException, "Failed to change directory");
}
return;
}
@@ -536,8 +539,8 @@ void nvim_set_current_buf(Buffer buffer, Error *err)
int result = do_buffer(DOBUF_GOTO, DOBUF_FIRST, FORWARD, buf->b_fnum, 0);
if (!try_end(err) && result == FAIL) {
api_set_error(err,
- Exception,
- _("Failed to switch to buffer %d"),
+ kErrorTypeException,
+ "Failed to switch to buffer %d",
buffer);
}
}
@@ -589,8 +592,8 @@ void nvim_set_current_win(Window window, Error *err)
goto_tabpage_win(win_find_tabpage(win), win);
if (!try_end(err) && win != curwin) {
api_set_error(err,
- Exception,
- _("Failed to switch to window %d"),
+ kErrorTypeException,
+ "Failed to switch to window %d",
window);
}
}
@@ -643,8 +646,8 @@ void nvim_set_current_tabpage(Tabpage tabpage, Error *err)
goto_tabpage_tp(tp, true, true);
if (!try_end(err) && tp != curtab) {
api_set_error(err,
- Exception,
- _("Failed to switch to tabpage %d"),
+ kErrorTypeException,
+ "Failed to switch to tabpage %d",
tabpage);
}
}
@@ -742,30 +745,30 @@ Array nvim_call_atomic(uint64_t channel_id, Array calls, Error *err)
for (i = 0; i < calls.size; i++) {
if (calls.items[i].type != kObjectTypeArray) {
api_set_error(err,
- Validation,
- _("All items in calls array must be arrays"));
+ kErrorTypeValidation,
+ "All items in calls array must be arrays");
goto validation_error;
}
Array call = calls.items[i].data.array;
if (call.size != 2) {
api_set_error(err,
- Validation,
- _("All items in calls array must be arrays of size 2"));
+ kErrorTypeValidation,
+ "All items in calls array must be arrays of size 2");
goto validation_error;
}
if (call.items[0].type != kObjectTypeString) {
api_set_error(err,
- Validation,
- _("name must be String"));
+ kErrorTypeValidation,
+ "Name must be String");
goto validation_error;
}
String name = call.items[0].data.string;
if (call.items[1].type != kObjectTypeArray) {
api_set_error(err,
- Validation,
- _("args must be Array"));
+ kErrorTypeValidation,
+ "Args must be Array");
goto validation_error;
}
Array args = call.items[1].data.array;
@@ -773,7 +776,7 @@ Array nvim_call_atomic(uint64_t channel_id, Array calls, Error *err)
MsgpackRpcRequestHandler handler = msgpack_rpc_get_handler_for(name.data,
name.size);
Object result = handler.fn(channel_id, args, &nested_error);
- if (nested_error.set) {
+ if (ERROR_SET(&nested_error)) {
// error handled after loop
break;
}
@@ -782,7 +785,7 @@ Array nvim_call_atomic(uint64_t channel_id, Array calls, Error *err)
}
ADD(rv, ARRAY_OBJ(results));
- if (nested_error.set) {
+ if (ERROR_SET(&nested_error)) {
Array errval = ARRAY_DICT_INIT;
ADD(errval, INTEGER_OBJ((Integer)i));
ADD(errval, INTEGER_OBJ(nested_error.type));
@@ -791,10 +794,12 @@ Array nvim_call_atomic(uint64_t channel_id, Array calls, Error *err)
} else {
ADD(rv, NIL);
}
- return rv;
+ goto theend;
validation_error:
api_free_array(results);
+theend:
+ api_clear_error(&nested_error);
return rv;
}
diff --git a/src/nvim/api/window.c b/src/nvim/api/window.c
index 3c564ada99..859bf88398 100644
--- a/src/nvim/api/window.c
+++ b/src/nvim/api/window.c
@@ -1,3 +1,6 @@
+// This is an open source non-commercial project. Dear PVS-Studio, please check
+// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
+
#include <stdbool.h>
#include <stdint.h>
#include <stdlib.h>
@@ -62,8 +65,8 @@ void nvim_win_set_cursor(Window window, ArrayOf(Integer, 2) pos, Error *err)
if (pos.size != 2 || pos.items[0].type != kObjectTypeInteger
|| pos.items[1].type != kObjectTypeInteger) {
api_set_error(err,
- Validation,
- _("Argument \"pos\" must be a [row, col] array"));
+ kErrorTypeValidation,
+ "Argument \"pos\" must be a [row, col] array");
return;
}
@@ -75,12 +78,12 @@ void nvim_win_set_cursor(Window window, ArrayOf(Integer, 2) pos, Error *err)
int64_t col = pos.items[1].data.integer;
if (row <= 0 || row > win->w_buffer->b_ml.ml_line_count) {
- api_set_error(err, Validation, _("Cursor position outside buffer"));
+ api_set_error(err, kErrorTypeValidation, "Cursor position outside buffer");
return;
}
if (col > MAXCOL || col < 0) {
- api_set_error(err, Validation, _("Column value outside range"));
+ api_set_error(err, kErrorTypeValidation, "Column value outside range");
return;
}
@@ -129,7 +132,7 @@ void nvim_win_set_height(Window window, Integer height, Error *err)
}
if (height > INT_MAX || height < INT_MIN) {
- api_set_error(err, Validation, _("Height value outside range"));
+ api_set_error(err, kErrorTypeValidation, "Height value outside range");
return;
}
@@ -174,7 +177,7 @@ void nvim_win_set_width(Window window, Integer width, Error *err)
}
if (width > INT_MAX || width < INT_MIN) {
- api_set_error(err, Validation, _("Width value outside range"));
+ api_set_error(err, kErrorTypeValidation, "Width value outside range");
return;
}
@@ -384,6 +387,8 @@ Boolean nvim_win_is_valid(Window window)
FUNC_API_SINCE(1)
{
Error stub = ERROR_INIT;
- return find_window_by_handle(window, &stub) != NULL;
+ Boolean ret = find_window_by_handle(window, &stub) != NULL;
+ api_clear_error(&stub);
+ return ret;
}
diff --git a/src/nvim/arabic.c b/src/nvim/arabic.c
index db97bd9dc4..1ef51d2a2a 100644
--- a/src/nvim/arabic.c
+++ b/src/nvim/arabic.c
@@ -1,3 +1,6 @@
+// This is an open source non-commercial project. Dear PVS-Studio, please check
+// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
+
/// @file arabic.c
///
/// Functions for Arabic language.
diff --git a/src/nvim/buffer.c b/src/nvim/buffer.c
index c9101c5b53..46f2cdac79 100644
--- a/src/nvim/buffer.c
+++ b/src/nvim/buffer.c
@@ -1,3 +1,6 @@
+// This is an open source non-commercial project. Dear PVS-Studio, please check
+// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
+
/*
* buffer.c: functions for dealing with the buffer structure
*/
@@ -741,12 +744,13 @@ static void clear_wininfo(buf_T *buf)
*/
void goto_buffer(exarg_T *eap, int start, int dir, int count)
{
- (void)do_buffer(*eap->cmd == 's' ? DOBUF_SPLIT : DOBUF_GOTO,
- start, dir, count, eap->forceit);
bufref_T old_curbuf;
set_bufref(&old_curbuf, curbuf);
swap_exists_action = SEA_DIALOG;
+ (void)do_buffer(*eap->cmd == 's' ? DOBUF_SPLIT : DOBUF_GOTO,
+ start, dir, count, eap->forceit);
+
if (swap_exists_action == SEA_QUIT && *eap->cmd == 's') {
cleanup_T cs;
@@ -1838,9 +1842,7 @@ int buflist_getfile(int n, linenr_T lnum, int options, int forceit)
return FAIL;
}
-/*
- * go to the last know line number for the current buffer
- */
+// Go to the last known line number for the current buffer.
void buflist_getfpos(void)
{
pos_T *fpos;
@@ -2338,9 +2340,7 @@ linenr_T buflist_findlnum(buf_T *buf)
return buflist_findfpos(buf)->lnum;
}
-/*
- * List all know file names (for :files and :buffers command).
- */
+// List all known file names (for :files and :buffers command).
void buflist_list(exarg_T *eap)
{
buf_T *buf;
@@ -2724,7 +2724,7 @@ fileinfo (
else
name = curbuf->b_ffname;
home_replace(shorthelp ? curbuf : NULL, name, p,
- (int)(IOSIZE - (p - buffer)), TRUE);
+ (size_t)(IOSIZE - (p - buffer)), true);
}
vim_snprintf_add((char *)buffer, IOSIZE, "\"%s%s%s%s%s%s",
@@ -2889,7 +2889,7 @@ void maketitle(void)
buf[off++] = ' ';
buf[off++] = '(';
home_replace(curbuf, curbuf->b_ffname,
- buf + off, SPACE_FOR_DIR - off, TRUE);
+ buf + off, (size_t)(SPACE_FOR_DIR - off), true);
#ifdef BACKSLASH_IN_FILENAME
/* avoid "c:/name" to be reduced to "c" */
if (isalpha(buf[off]) && buf[off + 1] == ':')
diff --git a/src/nvim/buffer.h b/src/nvim/buffer.h
index 016c5ce3b7..39b9faf8b1 100644
--- a/src/nvim/buffer.h
+++ b/src/nvim/buffer.h
@@ -103,7 +103,8 @@ static inline void buf_set_changedtick(buf_T *const buf, const int changedtick)
assert(changedtick_di->di_flags == (DI_FLAGS_RO|DI_FLAGS_FIX));
# endif
assert(changedtick_di == (dictitem_T *)&buf->changedtick_di);
- assert(&buf->b_changedtick == &buf->changedtick_di.di_tv.vval.v_number);
+ assert(&buf->b_changedtick // -V501
+ == &buf->changedtick_di.di_tv.vval.v_number);
#endif
buf->b_changedtick = changedtick;
}
diff --git a/src/nvim/charset.c b/src/nvim/charset.c
index 99d3e2dd88..ee58e0af91 100644
--- a/src/nvim/charset.c
+++ b/src/nvim/charset.c
@@ -1,3 +1,6 @@
+// This is an open source non-commercial project. Dear PVS-Studio, please check
+// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
+
/// @file charset.c
///
/// Code related to character sets.
@@ -15,6 +18,7 @@
#include "nvim/func_attr.h"
#include "nvim/indent.h"
#include "nvim/main.h"
+#include "nvim/mark.h"
#include "nvim/mbyte.h"
#include "nvim/memline.h"
#include "nvim/memory.h"
@@ -212,8 +216,8 @@ int buf_init_chartab(buf_T *buf, int global)
// work properly when 'encoding' is "latin1" and the locale is
// "C".
if (!do_isalpha
- || vim_islower(c)
- || vim_isupper(c)
+ || mb_islower(c)
+ || mb_isupper(c)
|| (p_altkeymap && (F_isalpha(c) || F_isdigit(c)))) {
if (i == 0) {
// (re)set ID flag
@@ -417,11 +421,11 @@ char_u* str_foldcase(char_u *str, int orglen, char_u *buf, int buflen)
while (STR_CHAR(i) != NUL) {
int c = utf_ptr2char(STR_PTR(i));
int olen = utf_ptr2len(STR_PTR(i));
- int lc = utf_tolower(c);
+ int lc = mb_tolower(c);
// Only replace the character when it is not an invalid
// sequence (ASCII character or more than one byte) and
- // utf_tolower() doesn't return the original character.
+ // mb_tolower() doesn't return the original character.
if (((c < 0x80) || (olen > 1)) && (c != lc)) {
int nlen = utf_char2len(lc);
@@ -1366,7 +1370,7 @@ void getvcols(win_T *wp, pos_T *pos1, pos_T *pos2, colnr_T *left,
colnr_T to1;
colnr_T to2;
- if (ltp(pos1, pos2)) {
+ if (lt(*pos1, *pos2)) {
getvvcol(wp, pos1, &from1, NULL, &to1);
getvvcol(wp, pos2, &from2, NULL, &to2);
} else {
@@ -1506,67 +1510,6 @@ char_u* skiptohex(char_u *q)
return p;
}
-// Vim's own character class functions. These exist because many library
-// islower()/toupper() etc. do not work properly: they crash when used with
-// invalid values or can't handle latin1 when the locale is C.
-// Speed is most important here.
-
-/// Check that the character is lower-case
-///
-/// @param c character to check
-bool vim_islower(int c)
- FUNC_ATTR_PURE FUNC_ATTR_WARN_UNUSED_RESULT
-{
- if (c <= '@') {
- return false;
- }
-
- if (c >= 0x80) {
- return utf_islower(c);
- }
- return islower(c);
-}
-
-/// Check that the character is upper-case
-///
-/// @param c character to check
-bool vim_isupper(int c)
- FUNC_ATTR_PURE FUNC_ATTR_WARN_UNUSED_RESULT
-{
- if (c <= '@') {
- return false;
- }
-
- if (c >= 0x80) {
- return utf_isupper(c);
- }
- return isupper(c);
-}
-
-int vim_toupper(int c)
-{
- if (c <= '@') {
- return c;
- }
-
- if (c >= 0x80) {
- return utf_toupper(c);
- }
- return TOUPPER_LOC(c);
-}
-
-int vim_tolower(int c)
-{
- if (c <= '@') {
- return c;
- }
-
- if (c >= 0x80) {
- return utf_tolower(c);
- }
- return TOLOWER_LOC(c);
-}
-
/// Skip over text until ' ' or '\t' or NUL
///
/// @param[in] p Text to skip over.
diff --git a/src/nvim/cursor.c b/src/nvim/cursor.c
index 45abd314fc..60002f3cea 100644
--- a/src/nvim/cursor.c
+++ b/src/nvim/cursor.c
@@ -1,3 +1,6 @@
+// This is an open source non-commercial project. Dear PVS-Studio, please check
+// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
+
#include <stdbool.h>
#include <inttypes.h>
diff --git a/src/nvim/cursor_shape.c b/src/nvim/cursor_shape.c
index b50462664c..dcc680f806 100644
--- a/src/nvim/cursor_shape.c
+++ b/src/nvim/cursor_shape.c
@@ -1,3 +1,6 @@
+// This is an open source non-commercial project. Dear PVS-Studio, please check
+// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
+
#include <assert.h>
#include <stdint.h>
#include "nvim/vim.h"
@@ -7,40 +10,75 @@
#include "nvim/charset.h"
#include "nvim/strings.h"
#include "nvim/syntax.h"
+#include "nvim/api/private/helpers.h"
+#include "nvim/ui.h"
-/*
- * Handling of cursor and mouse pointer shapes in various modes.
- */
-
-static cursorentry_T shape_table[SHAPE_IDX_COUNT] =
+/// Handling of cursor and mouse pointer shapes in various modes.
+cursorentry_T shape_table[SHAPE_IDX_COUNT] =
{
- /* The values will be filled in from the 'guicursor' and 'mouseshape'
- * defaults when Vim starts.
- * Adjust the SHAPE_IDX_ defines when making changes! */
- {0, 0, 0, 700L, 400L, 250L, 0, 0, "n", SHAPE_CURSOR+SHAPE_MOUSE},
- {0, 0, 0, 700L, 400L, 250L, 0, 0, "v", SHAPE_CURSOR+SHAPE_MOUSE},
- {0, 0, 0, 700L, 400L, 250L, 0, 0, "i", SHAPE_CURSOR+SHAPE_MOUSE},
- {0, 0, 0, 700L, 400L, 250L, 0, 0, "r", SHAPE_CURSOR+SHAPE_MOUSE},
- {0, 0, 0, 700L, 400L, 250L, 0, 0, "c", SHAPE_CURSOR+SHAPE_MOUSE},
- {0, 0, 0, 700L, 400L, 250L, 0, 0, "ci", SHAPE_CURSOR+SHAPE_MOUSE},
- {0, 0, 0, 700L, 400L, 250L, 0, 0, "cr", SHAPE_CURSOR+SHAPE_MOUSE},
- {0, 0, 0, 700L, 400L, 250L, 0, 0, "o", SHAPE_CURSOR+SHAPE_MOUSE},
- {0, 0, 0, 700L, 400L, 250L, 0, 0, "ve", SHAPE_CURSOR+SHAPE_MOUSE},
- {0, 0, 0, 0L, 0L, 0L, 0, 0, "e", SHAPE_MOUSE},
- {0, 0, 0, 0L, 0L, 0L, 0, 0, "s", SHAPE_MOUSE},
- {0, 0, 0, 0L, 0L, 0L, 0, 0, "sd", SHAPE_MOUSE},
- {0, 0, 0, 0L, 0L, 0L, 0, 0, "vs", SHAPE_MOUSE},
- {0, 0, 0, 0L, 0L, 0L, 0, 0, "vd", SHAPE_MOUSE},
- {0, 0, 0, 0L, 0L, 0L, 0, 0, "m", SHAPE_MOUSE},
- {0, 0, 0, 0L, 0L, 0L, 0, 0, "ml", SHAPE_MOUSE},
- {0, 0, 0, 100L, 100L, 100L, 0, 0, "sm", SHAPE_CURSOR},
+ // Values are set by 'guicursor' and 'mouseshape'.
+ // Adjust the SHAPE_IDX_ defines when changing this!
+ { "normal", 0, 0, 0, 700L, 400L, 250L, 0, 0, "n", SHAPE_CURSOR+SHAPE_MOUSE },
+ { "visual", 0, 0, 0, 700L, 400L, 250L, 0, 0, "v", SHAPE_CURSOR+SHAPE_MOUSE },
+ { "insert", 0, 0, 0, 700L, 400L, 250L, 0, 0, "i", SHAPE_CURSOR+SHAPE_MOUSE },
+ { "replace", 0, 0, 0, 700L, 400L, 250L, 0, 0, "r", SHAPE_CURSOR+SHAPE_MOUSE },
+ { "cmdline_normal", 0, 0, 0, 700L, 400L, 250L, 0, 0, "c", SHAPE_CURSOR+SHAPE_MOUSE },
+ { "cmdline_insert", 0, 0, 0, 700L, 400L, 250L, 0, 0, "ci", SHAPE_CURSOR+SHAPE_MOUSE },
+ { "cmdline_replace", 0, 0, 0, 700L, 400L, 250L, 0, 0, "cr", SHAPE_CURSOR+SHAPE_MOUSE },
+ { "operator", 0, 0, 0, 700L, 400L, 250L, 0, 0, "o", SHAPE_CURSOR+SHAPE_MOUSE },
+ { "visual_select", 0, 0, 0, 700L, 400L, 250L, 0, 0, "ve", SHAPE_CURSOR+SHAPE_MOUSE },
+ { "cmdline_hover", 0, 0, 0, 0L, 0L, 0L, 0, 0, "e", SHAPE_MOUSE },
+ { "statusline_hover", 0, 0, 0, 0L, 0L, 0L, 0, 0, "s", SHAPE_MOUSE },
+ { "statusline_drag", 0, 0, 0, 0L, 0L, 0L, 0, 0, "sd", SHAPE_MOUSE },
+ { "vsep_hover", 0, 0, 0, 0L, 0L, 0L, 0, 0, "vs", SHAPE_MOUSE },
+ { "vsep_drag", 0, 0, 0, 0L, 0L, 0L, 0, 0, "vd", SHAPE_MOUSE },
+ { "more", 0, 0, 0, 0L, 0L, 0L, 0, 0, "m", SHAPE_MOUSE },
+ { "more_lastline", 0, 0, 0, 0L, 0L, 0L, 0, 0, "ml", SHAPE_MOUSE },
+ { "showmatch", 0, 0, 0, 100L, 100L, 100L, 0, 0, "sm", SHAPE_CURSOR },
};
-/*
- * Parse the 'guicursor' option ("what" is SHAPE_CURSOR) or 'mouseshape'
- * ("what" is SHAPE_MOUSE).
- * Returns error message for an illegal option, NULL otherwise.
- */
+/// Converts cursor_shapes into an Array of Dictionaries
+/// @return Array of the form {[ "cursor_shape": ... ], ...}
+Array mode_style_array(void)
+{
+ Array all = ARRAY_DICT_INIT;
+
+ for (int i = 0; i < SHAPE_IDX_COUNT; i++) {
+ Dictionary dic = ARRAY_DICT_INIT;
+ cursorentry_T *cur = &shape_table[i];
+ if (cur->used_for & SHAPE_MOUSE) {
+ PUT(dic, "mouse_shape", INTEGER_OBJ(cur->mshape));
+ }
+ if (cur->used_for & SHAPE_CURSOR) {
+ String shape_str;
+ switch (cur->shape) {
+ case SHAPE_BLOCK: shape_str = cstr_to_string("block"); break;
+ case SHAPE_VER: shape_str = cstr_to_string("vertical"); break;
+ case SHAPE_HOR: shape_str = cstr_to_string("horizontal"); break;
+ default: shape_str = cstr_to_string("unknown");
+ }
+ PUT(dic, "cursor_shape", STRING_OBJ(shape_str));
+ PUT(dic, "cell_percentage", INTEGER_OBJ(cur->percentage));
+ PUT(dic, "blinkwait", INTEGER_OBJ(cur->blinkwait));
+ PUT(dic, "blinkon", INTEGER_OBJ(cur->blinkon));
+ PUT(dic, "blinkoff", INTEGER_OBJ(cur->blinkoff));
+ PUT(dic, "hl_id", INTEGER_OBJ(cur->id));
+ PUT(dic, "id_lm", INTEGER_OBJ(cur->id_lm));
+ }
+ PUT(dic, "name", STRING_OBJ(cstr_to_string(cur->full_name)));
+ PUT(dic, "short_name", STRING_OBJ(cstr_to_string(cur->name)));
+
+ ADD(all, DICTIONARY_OBJ(dic));
+ }
+
+ return all;
+}
+
+/// Parse the 'guicursor' option
+///
+/// @param what SHAPE_CURSOR or SHAPE_MOUSE ('mouseshape')
+///
+/// @returns error message for an illegal option, NULL otherwise.
char_u *parse_shape_opt(int what)
{
char_u *modep;
@@ -55,14 +93,13 @@ char_u *parse_shape_opt(int what)
int found_ve = false; /* found "ve" flag */
int round;
- /*
- * First round: check for errors; second round: do it for real.
- */
- for (round = 1; round <= 2; ++round) {
- /*
- * Repeat for all comma separated parts.
- */
+ // First round: check for errors; second round: do it for real.
+ for (round = 1; round <= 2; round++) {
+ // Repeat for all comma separated parts.
modep = p_guicursor;
+ if (*p_guicursor == NUL) {
+ modep = (char_u *)"a:block-blinkon0";
+ }
while (*modep != NUL) {
colonp = vim_strchr(modep, ':');
if (colonp == NULL)
@@ -71,19 +108,18 @@ char_u *parse_shape_opt(int what)
return (char_u *)N_("E546: Illegal mode");
commap = vim_strchr(modep, ',');
- /*
- * Repeat for all mode's before the colon.
- * For the 'a' mode, we loop to handle all the modes.
- */
+ // Repeat for all modes before the colon.
+ // For the 'a' mode, we loop to handle all the modes.
all_idx = -1;
assert(modep < colonp);
while (modep < colonp || all_idx >= 0) {
if (all_idx < 0) {
- /* Find the mode. */
- if (modep[1] == '-' || modep[1] == ':')
+ // Find the mode
+ if (modep[1] == '-' || modep[1] == ':') {
len = 1;
- else
+ } else {
len = 2;
+ }
if (len == 1 && TOLOWER_ASC(modep[0]) == 'a') {
all_idx = SHAPE_IDX_COUNT - 1;
@@ -100,11 +136,11 @@ char_u *parse_shape_opt(int what)
modep += len + 1;
}
- if (all_idx >= 0)
+ if (all_idx >= 0) {
idx = all_idx--;
- else if (round == 2) {
+ } else if (round == 2) {
{
- /* Set the defaults, for the missing parts */
+ // Set the defaults, for the missing parts
shape_table[idx].shape = SHAPE_BLOCK;
shape_table[idx].blinkwait = 700L;
shape_table[idx].blinkon = 400L;
@@ -208,6 +244,55 @@ char_u *parse_shape_opt(int what)
shape_table[SHAPE_IDX_VE].id_lm = shape_table[SHAPE_IDX_V].id_lm;
}
}
-
+ ui_mode_info_set();
return NULL;
}
+
+
+/// Map cursor mode from string to integer
+///
+/// @param mode Fullname of the mode whose id we are looking for
+/// @return -1 in case of failure, else the matching SHAPE_ID* integer
+int cursor_mode_str2int(const char *mode)
+{
+ for (int current_mode = 0; current_mode < SHAPE_IDX_COUNT; current_mode++) {
+ if (strcmp(shape_table[current_mode].full_name, mode) == 0) {
+ return current_mode;
+ }
+ }
+ ELOG("Unknown mode %s", mode);
+ return -1;
+}
+
+
+/// Return the index into shape_table[] for the current mode.
+int cursor_get_mode_idx(void)
+{
+ if (State == SHOWMATCH) {
+ return SHAPE_IDX_SM;
+ } else if (State & VREPLACE_FLAG) {
+ return SHAPE_IDX_R;
+ } else if (State & REPLACE_FLAG) {
+ return SHAPE_IDX_R;
+ } else if (State & INSERT) {
+ return SHAPE_IDX_I;
+ } else if (State & CMDLINE) {
+ if (cmdline_at_end()) {
+ return SHAPE_IDX_C;
+ } else if (cmdline_overstrike()) {
+ return SHAPE_IDX_CR;
+ } else {
+ return SHAPE_IDX_CI;
+ }
+ } else if (finish_op) {
+ return SHAPE_IDX_O;
+ } else if (VIsual_active) {
+ if (*p_sel == 'e') {
+ return SHAPE_IDX_VE;
+ } else {
+ return SHAPE_IDX_V;
+ }
+ } else {
+ return SHAPE_IDX_N;
+ }
+}
diff --git a/src/nvim/cursor_shape.h b/src/nvim/cursor_shape.h
index 9ce1b6e0a0..2c466603f0 100644
--- a/src/nvim/cursor_shape.h
+++ b/src/nvim/cursor_shape.h
@@ -1,32 +1,37 @@
#ifndef NVIM_CURSOR_SHAPE_H
#define NVIM_CURSOR_SHAPE_H
-/*
- * struct to store values from 'guicursor' and 'mouseshape'
- */
-/* Indexes in shape_table[] */
-#define SHAPE_IDX_N 0 /* Normal mode */
-#define SHAPE_IDX_V 1 /* Visual mode */
-#define SHAPE_IDX_I 2 /* Insert mode */
-#define SHAPE_IDX_R 3 /* Replace mode */
-#define SHAPE_IDX_C 4 /* Command line Normal mode */
-#define SHAPE_IDX_CI 5 /* Command line Insert mode */
-#define SHAPE_IDX_CR 6 /* Command line Replace mode */
-#define SHAPE_IDX_O 7 /* Operator-pending mode */
-#define SHAPE_IDX_VE 8 /* Visual mode with 'selection' exclusive */
-#define SHAPE_IDX_CLINE 9 /* On command line */
-#define SHAPE_IDX_STATUS 10 /* A status line */
-#define SHAPE_IDX_SDRAG 11 /* dragging a status line */
-#define SHAPE_IDX_VSEP 12 /* A vertical separator line */
-#define SHAPE_IDX_VDRAG 13 /* dragging a vertical separator line */
-#define SHAPE_IDX_MORE 14 /* Hit-return or More */
-#define SHAPE_IDX_MOREL 15 /* Hit-return or More in last line */
-#define SHAPE_IDX_SM 16 /* showing matching paren */
-#define SHAPE_IDX_COUNT 17
-
-#define SHAPE_BLOCK 0 /* block cursor */
-#define SHAPE_HOR 1 /* horizontal bar cursor */
-#define SHAPE_VER 2 /* vertical bar cursor */
+#include "nvim/types.h"
+#include "nvim/api/private/defs.h"
+
+/// struct to store values from 'guicursor' and 'mouseshape'
+/// Indexes in shape_table[]
+typedef enum {
+SHAPE_IDX_N = 0, ///< Normal mode
+SHAPE_IDX_V = 1, ///< Visual mode
+SHAPE_IDX_I = 2, ///< Insert mode
+SHAPE_IDX_R = 3, ///< Replace mode
+SHAPE_IDX_C = 4, ///< Command line Normal mode
+SHAPE_IDX_CI = 5, ///< Command line Insert mode
+SHAPE_IDX_CR = 6, ///< Command line Replace mode
+SHAPE_IDX_O = 7, ///< Operator-pending mode
+SHAPE_IDX_VE = 8, ///< Visual mode with 'selection' exclusive
+SHAPE_IDX_CLINE = 9, ///< On command line
+SHAPE_IDX_STATUS = 10, ///< On status line
+SHAPE_IDX_SDRAG = 11, ///< dragging a status line
+SHAPE_IDX_VSEP = 12, ///< On vertical separator line
+SHAPE_IDX_VDRAG = 13, ///< dragging a vertical separator line
+SHAPE_IDX_MORE = 14, ///< Hit-return or More
+SHAPE_IDX_MOREL = 15, ///< Hit-return or More in last line
+SHAPE_IDX_SM = 16, ///< showing matching paren
+SHAPE_IDX_COUNT = 17
+} ModeShape;
+
+typedef enum {
+SHAPE_BLOCK = 0, ///< block cursor
+SHAPE_HOR = 1, ///< horizontal bar cursor
+SHAPE_VER = 2 ///< vertical bar cursor
+} CursorShape;
#define MSHAPE_NUMBERED 1000 /* offset for shapes identified by number */
#define MSHAPE_HIDE 1 /* hide mouse pointer */
@@ -35,18 +40,20 @@
#define SHAPE_CURSOR 2 /* used for text cursor shape */
typedef struct cursor_entry {
- int shape; /* one of the SHAPE_ defines */
- int mshape; /* one of the MSHAPE defines */
- int percentage; /* percentage of cell for bar */
- long blinkwait; /* blinking, wait time before blinking starts */
- long blinkon; /* blinking, on time */
- long blinkoff; /* blinking, off time */
- int id; /* highlight group ID */
- int id_lm; /* highlight group ID for :lmap mode */
- char *name; /* mode name (fixed) */
- char used_for; /* SHAPE_MOUSE and/or SHAPE_CURSOR */
+ char *full_name; ///< mode description
+ CursorShape shape; ///< cursor shape: one of the SHAPE_ defines
+ int mshape; ///< mouse shape: one of the MSHAPE defines
+ int percentage; ///< percentage of cell for bar
+ long blinkwait; ///< blinking, wait time before blinking starts
+ long blinkon; ///< blinking, on time
+ long blinkoff; ///< blinking, off time
+ int id; ///< highlight group ID
+ int id_lm; ///< highlight group ID for :lmap mode
+ char *name; ///< mode short name
+ char used_for; ///< SHAPE_MOUSE and/or SHAPE_CURSOR
} cursorentry_T;
+extern cursorentry_T shape_table[SHAPE_IDX_COUNT];
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "cursor_shape.h.generated.h"
diff --git a/src/nvim/diff.c b/src/nvim/diff.c
index ff76abc01f..0bd3f59cf2 100644
--- a/src/nvim/diff.c
+++ b/src/nvim/diff.c
@@ -1,3 +1,6 @@
+// This is an open source non-commercial project. Dear PVS-Studio, please check
+// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
+
/// @file diff.c
///
/// Code for diff'ing two, three or four buffers.
@@ -1076,8 +1079,8 @@ void diff_win_options(win_T *wp, int addbuf)
if (!wp->w_p_diff) {
wp->w_p_wrap_save = wp->w_p_wrap;
}
- wp->w_p_wrap = FALSE;
- curwin = wp;
+ wp->w_p_wrap = false;
+ curwin = wp; // -V519
curbuf = curwin->w_buffer;
if (!wp->w_p_diff) {
diff --git a/src/nvim/diff.h b/src/nvim/diff.h
index f6cef1cafd..3624ce29bb 100644
--- a/src/nvim/diff.h
+++ b/src/nvim/diff.h
@@ -1,6 +1,9 @@
#ifndef NVIM_DIFF_H
#define NVIM_DIFF_H
+#include "nvim/pos.h"
+#include "nvim/ex_cmds_defs.h"
+
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "diff.h.generated.h"
#endif
diff --git a/src/nvim/digraph.c b/src/nvim/digraph.c
index 560205fe7d..32e71f61f7 100644
--- a/src/nvim/digraph.c
+++ b/src/nvim/digraph.c
@@ -1,3 +1,6 @@
+// This is an open source non-commercial project. Dear PVS-Studio, please check
+// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
+
/// @file digraph.c
///
/// code for digraphs
@@ -1569,7 +1572,8 @@ int getdigraph(int char1, int char2, int meta_char)
if (((retval = getexactdigraph(char1, char2, meta_char)) == char2)
&& (char1 != char2)
- && ((retval = getexactdigraph(char2, char1, meta_char)) == char1)) {
+ && ((retval = getexactdigraph(char2, char1, meta_char)) // -V764
+ == char1)) {
return char2;
}
return retval;
@@ -1675,11 +1679,7 @@ static void printdigraph(digr_T *dp)
int list_width;
- if ((dy_flags & DY_UHEX) || has_mbyte) {
- list_width = 13;
- } else {
- list_width = 11;
- }
+ list_width = 13;
if (dp->result != 0) {
if (msg_col > Columns - list_width) {
@@ -1700,15 +1700,11 @@ static void printdigraph(digr_T *dp)
*p++ = dp->char2;
*p++ = ' ';
- if (has_mbyte) {
- // add a space to draw a composing char on
- if (enc_utf8 && utf_iscomposing(dp->result)) {
- *p++ = ' ';
- }
- p += (*mb_char2bytes)(dp->result, p);
- } else {
- *p++ = (char_u)dp->result;
+ // add a space to draw a composing char on
+ if (utf_iscomposing(dp->result)) {
+ *p++ = ' ';
}
+ p += (*mb_char2bytes)(dp->result, p);
if (char2cells(dp->result) == 1) {
*p++ = ' ';
diff --git a/src/nvim/digraph.h b/src/nvim/digraph.h
index b623969e08..1b73ccaf3f 100644
--- a/src/nvim/digraph.h
+++ b/src/nvim/digraph.h
@@ -1,6 +1,9 @@
#ifndef NVIM_DIGRAPH_H
#define NVIM_DIGRAPH_H
+#include "nvim/types.h"
+#include "nvim/ex_cmds_defs.h"
+
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "digraph.h.generated.h"
#endif
diff --git a/src/nvim/edit.c b/src/nvim/edit.c
index da09aed3dc..678fa851eb 100644
--- a/src/nvim/edit.c
+++ b/src/nvim/edit.c
@@ -1,3 +1,6 @@
+// This is an open source non-commercial project. Dear PVS-Studio, please check
+// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
+
/*
* edit.c: functions for Insert mode
*/
@@ -2037,12 +2040,12 @@ int ins_compl_add_infercase(char_u *str, int len, int icase, char_u *fname, int
} else {
c = *(p++);
}
- if (vim_islower(c)) {
+ if (mb_islower(c)) {
has_lower = true;
- if (vim_isupper(wca[i])) {
+ if (mb_isupper(wca[i])) {
// Rule 1 is satisfied.
for (i = actual_compl_length; i < actual_len; i++) {
- wca[i] = vim_tolower(wca[i]);
+ wca[i] = mb_tolower(wca[i]);
}
break;
}
@@ -2062,14 +2065,14 @@ int ins_compl_add_infercase(char_u *str, int len, int icase, char_u *fname, int
} else {
c = *(p++);
}
- if (was_letter && vim_isupper(c) && vim_islower(wca[i])) {
+ if (was_letter && mb_isupper(c) && mb_islower(wca[i])) {
// Rule 2 is satisfied.
for (i = actual_compl_length; i < actual_len; i++) {
- wca[i] = vim_toupper(wca[i]);
+ wca[i] = mb_toupper(wca[i]);
}
break;
}
- was_letter = vim_islower(c) || vim_isupper(c);
+ was_letter = mb_islower(c) || mb_isupper(c);
}
}
@@ -2082,10 +2085,10 @@ int ins_compl_add_infercase(char_u *str, int len, int icase, char_u *fname, int
} else {
c = *(p++);
}
- if (vim_islower(c)) {
- wca[i] = vim_tolower(wca[i]);
- } else if (vim_isupper(c)) {
- wca[i] = vim_toupper(wca[i]);
+ if (mb_islower(c)) {
+ wca[i] = mb_tolower(wca[i]);
+ } else if (mb_isupper(c)) {
+ wca[i] = mb_toupper(wca[i]);
}
}
}
@@ -2109,7 +2112,7 @@ int ins_compl_add_infercase(char_u *str, int len, int icase, char_u *fname, int
xfree(wca);
- return ins_compl_add(IObuff, len, icase, fname, NULL, true, dir, flags,
+ return ins_compl_add(IObuff, len, icase, fname, NULL, false, dir, flags,
false);
}
return ins_compl_add(str, len, icase, fname, NULL, false, dir, flags, false);
@@ -2146,7 +2149,7 @@ static int ins_compl_add(char_u *const str, int len,
os_breakcheck();
#define FREE_CPTEXT(cptext, cptext_allocated) \
do { \
- if (cptext_allocated) { \
+ if (cptext != NULL && cptext_allocated) { \
for (size_t i = 0; i < CPT_COUNT; i++) { \
xfree(cptext[i]); \
} \
@@ -2302,9 +2305,10 @@ static void ins_compl_longest_match(compl_T *match)
c1 = *p;
c2 = *s;
}
- if (match->cp_icase ? (vim_tolower(c1) != vim_tolower(c2))
- : (c1 != c2))
+ if (match->cp_icase ? (mb_tolower(c1) != mb_tolower(c2))
+ : (c1 != c2)) {
break;
+ }
if (has_mbyte) {
mb_ptr_adv(p);
mb_ptr_adv(s);
@@ -3418,6 +3422,7 @@ static void ins_compl_fixRedoBufForLeader(char_u *ptr_arg)
else
return; /* nothing to do */
}
+ assert(ptr != NULL);
if (compl_orig_text != NULL) {
p = compl_orig_text;
for (len = 0; p[len] != NUL && p[len] == ptr[len]; ++len)
@@ -3426,10 +3431,11 @@ static void ins_compl_fixRedoBufForLeader(char_u *ptr_arg)
len -= (*mb_head_off)(p, p + len);
for (p += len; *p != NUL; mb_ptr_adv(p))
AppendCharToRedobuff(K_BS);
- } else
+ } else {
len = 0;
- if (ptr != NULL)
- AppendToRedobuffLit(ptr + len, -1);
+ }
+ assert(ptr != NULL);
+ AppendToRedobuffLit(ptr + len, -1);
}
/*
diff --git a/src/nvim/eval.c b/src/nvim/eval.c
index 80c2fe10d7..d7feed8bfd 100644
--- a/src/nvim/eval.c
+++ b/src/nvim/eval.c
@@ -1,3 +1,6 @@
+// This is an open source non-commercial project. Dear PVS-Studio, please check
+// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
+
/*
* eval.c: Expression evaluation.
*/
@@ -462,6 +465,7 @@ typedef struct {
int refcount;
long timeout;
bool stopped;
+ bool paused;
Callback callback;
} timer_T;
@@ -2378,9 +2382,9 @@ static void set_var_lval(lval_T *lp, char_u *endp, typval_T *rettv,
&tv, &di, true, false) == OK) {
if ((di == NULL
|| (!var_check_ro(di->di_flags, (const char *)lp->ll_name,
- STRLEN(lp->ll_name))
+ TV_CSTRING)
&& !tv_check_lock(di->di_tv.v_lock, (const char *)lp->ll_name,
- STRLEN(lp->ll_name))))
+ TV_CSTRING)))
&& eexe_mod_op(&tv, rettv, (const char *)op) == OK) {
set_var(lp->ll_name, lp->ll_name_len, &tv, false);
}
@@ -2393,7 +2397,7 @@ static void set_var_lval(lval_T *lp, char_u *endp, typval_T *rettv,
} else if (tv_check_lock(lp->ll_newkey == NULL
? lp->ll_tv->v_lock
: lp->ll_tv->vval.v_dict->dv_lock,
- (const char *)lp->ll_name, STRLEN(lp->ll_name))) {
+ (const char *)lp->ll_name, TV_CSTRING)) {
} else if (lp->ll_range) {
listitem_T *ll_li = lp->ll_li;
int ll_n1 = lp->ll_n1;
@@ -2402,7 +2406,7 @@ static void set_var_lval(lval_T *lp, char_u *endp, typval_T *rettv,
for (listitem_T *ri = rettv->vval.v_list->lv_first;
ri != NULL && ll_li != NULL; ) {
if (tv_check_lock(ll_li->li_tv.v_lock, (const char *)lp->ll_name,
- STRLEN(lp->ll_name))) {
+ TV_CSTRING)) {
return;
}
ri = ri->li_next;
@@ -2741,12 +2745,13 @@ void ex_call(exarg_T *eap)
* call, and the loop is broken.
*/
if (eap->skip) {
- ++emsg_skip;
- lnum = eap->line2; /* do it once, also with an invalid range */
- } else
+ emsg_skip++;
+ lnum = eap->line2; // Do it once, also with an invalid range.
+ } else {
lnum = eap->line1;
- for (; lnum <= eap->line2; ++lnum) {
- if (!eap->skip && eap->addr_count > 0) {
+ }
+ for (; lnum <= eap->line2; lnum++) {
+ if (!eap->skip && eap->addr_count > 0) { // -V560
curwin->w_cursor.lnum = lnum;
curwin->w_cursor.col = 0;
curwin->w_cursor.coladd = 0;
@@ -2767,7 +2772,7 @@ void ex_call(exarg_T *eap)
}
tv_clear(&rettv);
- if (doesrange || eap->skip) {
+ if (doesrange || eap->skip) { // -V560
break;
}
@@ -2992,14 +2997,13 @@ int do_unlet(const char *const name, const size_t name_len, const int forceit)
}
if (hi != NULL && !HASHITEM_EMPTY(hi)) {
dictitem_T *const di = TV_DICT_HI2DI(hi);
- if (var_check_fixed(di->di_flags, (const char *)name, STRLEN(name))
- || var_check_ro(di->di_flags, (const char *)name, STRLEN(name))
- || tv_check_lock(d->dv_lock, (const char *)name, STRLEN(name))) {
+ if (var_check_fixed(di->di_flags, (const char *)name, TV_CSTRING)
+ || var_check_ro(di->di_flags, (const char *)name, TV_CSTRING)
+ || tv_check_lock(d->dv_lock, (const char *)name, TV_CSTRING)) {
return FAIL;
}
- if (d == NULL
- || tv_check_lock(d->dv_lock, (const char *)name, STRLEN(name))) {
+ if (tv_check_lock(d->dv_lock, (const char *)name, TV_CSTRING)) {
return FAIL;
}
@@ -4763,7 +4767,7 @@ static int get_string_tv(char_u **arg, typval_T *rettv, int evaluate)
// Special key, e.g.: "\<C-W>"
case '<':
- extra = trans_special((const char_u **) &p, STRLEN(p), name, true);
+ extra = trans_special((const char_u **)&p, STRLEN(p), name, true, true);
if (extra != 0) {
name += extra;
break;
@@ -6508,7 +6512,7 @@ static void api_wrapper(typval_T *argvars, typval_T *rettv, FunPtr fptr)
Error err = ERROR_INIT;
Object result = fn(INTERNAL_CALL, args, &err);
- if (err.set) {
+ if (ERROR_SET(&err)) {
nvim_err_writeln(cstr_as_string(err.msg));
goto end;
}
@@ -6520,6 +6524,7 @@ static void api_wrapper(typval_T *argvars, typval_T *rettv, FunPtr fptr)
end:
api_free_array(args);
api_free_object(result);
+ api_clear_error(&err);
}
/*
@@ -6553,10 +6558,8 @@ static void f_add(typval_T *argvars, typval_T *rettv, FunPtr fptr)
rettv->vval.v_number = 1; /* Default: Failed */
if (argvars[0].v_type == VAR_LIST) {
- const char *const arg_errmsg = _("add() argument");
- const size_t arg_errmsg_len = strlen(arg_errmsg);
if ((l = argvars[0].vval.v_list) != NULL
- && !tv_check_lock(l->lv_lock, arg_errmsg, arg_errmsg_len)) {
+ && !tv_check_lock(l->lv_lock, "add() argument", TV_TRANSLATE)) {
tv_list_append_tv(l, &argvars[1]);
tv_copy(&argvars[0], rettv);
}
@@ -7305,18 +7308,14 @@ static void f_changenr(typval_T *argvars, typval_T *rettv, FunPtr fptr)
*/
static void f_char2nr(typval_T *argvars, typval_T *rettv, FunPtr fptr)
{
- if (has_mbyte) {
- int utf8 = 0;
-
- if (argvars[1].v_type != VAR_UNKNOWN) {
- utf8 = tv_get_number_chk(&argvars[1], NULL);
+ if (argvars[1].v_type != VAR_UNKNOWN) {
+ if (!tv_check_num(&argvars[1])) {
+ return;
}
-
- rettv->vval.v_number = (utf8 ? *utf_ptr2char : *mb_ptr2char)(
- (const char_u *)tv_get_string(&argvars[0]));
- } else {
- rettv->vval.v_number = (uint8_t)(tv_get_string(&argvars[0])[0]);
}
+
+ rettv->vval.v_number = utf_ptr2char(
+ (const char_u *)tv_get_string(&argvars[0]));
}
/*
@@ -8152,7 +8151,6 @@ static void f_expand(typval_T *argvars, typval_T *rettv, FunPtr fptr)
static void f_extend(typval_T *argvars, typval_T *rettv, FunPtr fptr)
{
const char *const arg_errmsg = N_("extend() argument");
- const size_t arg_errmsg_len = strlen(arg_errmsg);
if (argvars[0].v_type == VAR_LIST && argvars[1].v_type == VAR_LIST) {
long before;
@@ -8161,13 +8159,13 @@ static void f_extend(typval_T *argvars, typval_T *rettv, FunPtr fptr)
list_T *const l1 = argvars[0].vval.v_list;
list_T *const l2 = argvars[1].vval.v_list;
if (l1 == NULL) {
- const bool locked = tv_check_lock(VAR_FIXED, arg_errmsg, arg_errmsg_len);
+ const bool locked = tv_check_lock(VAR_FIXED, arg_errmsg, TV_TRANSLATE);
(void)locked;
assert(locked == true);
} else if (l2 == NULL) {
// Do nothing
tv_copy(&argvars[0], rettv);
- } else if (!tv_check_lock(l1->lv_lock, arg_errmsg, arg_errmsg_len)) {
+ } else if (!tv_check_lock(l1->lv_lock, arg_errmsg, TV_TRANSLATE)) {
listitem_T *item;
if (argvars[2].v_type != VAR_UNKNOWN) {
before = tv_get_number_chk(&argvars[2], &error);
@@ -8195,13 +8193,13 @@ static void f_extend(typval_T *argvars, typval_T *rettv, FunPtr fptr)
dict_T *const d1 = argvars[0].vval.v_dict;
dict_T *const d2 = argvars[1].vval.v_dict;
if (d1 == NULL) {
- const bool locked = tv_check_lock(VAR_FIXED, arg_errmsg, arg_errmsg_len);
+ const bool locked = tv_check_lock(VAR_FIXED, arg_errmsg, TV_TRANSLATE);
(void)locked;
assert(locked == true);
} else if (d2 == NULL) {
// Do nothing
tv_copy(&argvars[0], rettv);
- } else if (!tv_check_lock(d1->dv_lock, arg_errmsg, arg_errmsg_len)) {
+ } else if (!tv_check_lock(d1->dv_lock, arg_errmsg, TV_TRANSLATE)) {
const char *action = "force";
// Check the third argument.
if (argvars[2].v_type != VAR_UNKNOWN) {
@@ -8349,20 +8347,19 @@ static void filter_map(typval_T *argvars, typval_T *rettv, int map)
int todo;
char_u *ermsg = (char_u *)(map ? "map()" : "filter()");
const char *const arg_errmsg = (map
- ? _("map() argument")
- : _("filter() argument"));
- const size_t arg_errmsg_len = strlen(arg_errmsg);
+ ? N_("map() argument")
+ : N_("filter() argument"));
int save_did_emsg;
int idx = 0;
if (argvars[0].v_type == VAR_LIST) {
if ((l = argvars[0].vval.v_list) == NULL
- || (!map && tv_check_lock(l->lv_lock, arg_errmsg, arg_errmsg_len))) {
+ || (!map && tv_check_lock(l->lv_lock, arg_errmsg, TV_TRANSLATE))) {
return;
}
} else if (argvars[0].v_type == VAR_DICT) {
if ((d = argvars[0].vval.v_dict) == NULL
- || (!map && tv_check_lock(d->dv_lock, arg_errmsg, arg_errmsg_len))) {
+ || (!map && tv_check_lock(d->dv_lock, arg_errmsg, TV_TRANSLATE))) {
return;
}
} else {
@@ -8395,8 +8392,8 @@ static void filter_map(typval_T *argvars, typval_T *rettv, int map)
di = TV_DICT_HI2DI(hi);
if (map
- && (tv_check_lock(di->di_tv.v_lock, arg_errmsg, arg_errmsg_len)
- || var_check_ro(di->di_flags, arg_errmsg, arg_errmsg_len))) {
+ && (tv_check_lock(di->di_tv.v_lock, arg_errmsg, TV_TRANSLATE)
+ || var_check_ro(di->di_flags, arg_errmsg, TV_TRANSLATE))) {
break;
}
@@ -8407,8 +8404,8 @@ static void filter_map(typval_T *argvars, typval_T *rettv, int map)
break;
}
if (!map && rem) {
- if (var_check_fixed(di->di_flags, arg_errmsg, arg_errmsg_len)
- || var_check_ro(di->di_flags, arg_errmsg, arg_errmsg_len)) {
+ if (var_check_fixed(di->di_flags, arg_errmsg, TV_TRANSLATE)
+ || var_check_ro(di->di_flags, arg_errmsg, TV_TRANSLATE)) {
break;
}
tv_dict_item_remove(d, di);
@@ -8421,7 +8418,7 @@ static void filter_map(typval_T *argvars, typval_T *rettv, int map)
for (li = l->lv_first; li != NULL; li = nli) {
if (map
- && tv_check_lock(li->li_tv.v_lock, arg_errmsg, arg_errmsg_len)) {
+ && tv_check_lock(li->li_tv.v_lock, arg_errmsg, TV_TRANSLATE)) {
break;
}
nli = li->li_next;
@@ -8666,7 +8663,6 @@ static void f_foldtext(typval_T *argvars, typval_T *rettv, FunPtr fptr)
char_u *r;
int len;
char *txt;
- long count;
rettv->v_type = VAR_STRING;
rettv->vval.v_string = NULL;
@@ -8694,8 +8690,8 @@ static void f_foldtext(typval_T *argvars, typval_T *rettv, FunPtr fptr)
s = skipwhite(s + 1);
}
}
- count = (long)(foldend - foldstart + 1);
- txt = _("+-%s%3ld lines: ");
+ unsigned long count = (unsigned long)(foldend - foldstart + 1);
+ txt = ngettext("+-%s%3ld line: ", "+-%s%3ld lines: ", count);
r = xmalloc(STRLEN(txt)
+ STRLEN(dashes) // for %s
+ 20 // for %3ld
@@ -8715,7 +8711,7 @@ static void f_foldtext(typval_T *argvars, typval_T *rettv, FunPtr fptr)
static void f_foldtextresult(typval_T *argvars, typval_T *rettv, FunPtr fptr)
{
char_u *text;
- char_u buf[51];
+ char_u buf[FOLD_TEXT_LEN];
foldinfo_T foldinfo;
int fold_count;
@@ -8728,10 +8724,10 @@ static void f_foldtextresult(typval_T *argvars, typval_T *rettv, FunPtr fptr)
}
fold_count = foldedCount(curwin, lnum, &foldinfo);
if (fold_count > 0) {
- text = get_foldtext(curwin, lnum, lnum + fold_count - 1,
- &foldinfo, buf);
- if (text == buf)
+ text = get_foldtext(curwin, lnum, lnum + fold_count - 1, &foldinfo, buf);
+ if (text == buf) {
text = vim_strsave(text);
+ }
rettv->vval.v_string = text;
}
}
@@ -8981,13 +8977,10 @@ static void f_get(typval_T *argvars, typval_T *rettv, FunPtr fptr)
if (strcmp(what, "func") == 0 || strcmp(what, "name") == 0) {
rettv->v_type = (*what == 'f' ? VAR_FUNC : VAR_STRING);
const char *const n = (const char *)partial_name(pt);
- if (n == NULL) {
- rettv->vval.v_string = NULL;
- } else {
- rettv->vval.v_string = (char_u *)xstrdup(n);
- if (rettv->v_type == VAR_FUNC) {
- func_ref(rettv->vval.v_string);
- }
+ assert(n != NULL);
+ rettv->vval.v_string = (char_u *)xstrdup(n);
+ if (rettv->v_type == VAR_FUNC) {
+ func_ref(rettv->vval.v_string);
}
} else if (strcmp(what, "dict") == 0) {
rettv->v_type = VAR_DICT;
@@ -11008,18 +11001,19 @@ static void get_user_input(typval_T *argvars, typval_T *rettv, int inputdialog)
cmdline_row = msg_row;
const char *defstr = "";
+ char buf[NUMBUFLEN];
if (argvars[1].v_type != VAR_UNKNOWN) {
- char buf[NUMBUFLEN];
defstr = tv_get_string_buf_chk(&argvars[1], buf);
if (defstr != NULL) {
stuffReadbuffSpec(defstr);
}
if (!inputdialog && argvars[2].v_type != VAR_UNKNOWN) {
+ char buf2[NUMBUFLEN];
// input() with a third argument: completion
rettv->vval.v_string = NULL;
- const char *const xp_name = tv_get_string_buf_chk(&argvars[2], buf);
+ const char *const xp_name = tv_get_string_buf_chk(&argvars[2], buf2);
if (xp_name == NULL) {
return;
}
@@ -11157,13 +11151,12 @@ static void f_insert(typval_T *argvars, typval_T *rettv, FunPtr fptr)
{
list_T *l;
bool error = false;
- const char *const arg_errmsg = _("insert() argument");
- const size_t arg_errmsg_len = strlen(arg_errmsg);
if (argvars[0].v_type != VAR_LIST) {
EMSG2(_(e_listarg), "insert()");
} else if ((l = argvars[0].vval.v_list) != NULL
- && !tv_check_lock(l->lv_lock, arg_errmsg, arg_errmsg_len)) {
+ && !tv_check_lock(l->lv_lock, N_("insert() argument"),
+ TV_TRANSLATE)) {
long before = 0;
if (argvars[2].v_type != VAR_UNKNOWN) {
before = tv_get_number_chk(&argvars[2], &error);
@@ -12544,7 +12537,7 @@ static void f_min(typval_T *argvars, typval_T *rettv, FunPtr fptr)
*/
static void f_mkdir(typval_T *argvars, typval_T *rettv, FunPtr fptr)
{
- int prot = 0755;
+ int prot = 0755; // -V536
rettv->vval.v_number = FAIL;
if (check_restricted() || check_secure())
@@ -12769,25 +12762,32 @@ static void f_nextnonblank(typval_T *argvars, typval_T *rettv, FunPtr fptr)
*/
static void f_nr2char(typval_T *argvars, typval_T *rettv, FunPtr fptr)
{
- char_u buf[NUMBUFLEN];
-
- if (has_mbyte) {
- int utf8 = 0;
-
- if (argvars[1].v_type != VAR_UNKNOWN) {
- utf8 = tv_get_number_chk(&argvars[1], NULL);
- }
- if (utf8) {
- buf[(*utf_char2bytes)((int)tv_get_number(&argvars[0]), buf)] = NUL;
- } else {
- buf[(*mb_char2bytes)((int)tv_get_number(&argvars[0]), buf)] = NUL;
+ if (argvars[1].v_type != VAR_UNKNOWN) {
+ if (!tv_check_num(&argvars[1])) {
+ return;
}
- } else {
- buf[0] = (char_u)tv_get_number(&argvars[0]);
- buf[1] = NUL;
}
+
+ bool error = false;
+ const varnumber_T num = tv_get_number_chk(&argvars[0], &error);
+ if (error) {
+ return;
+ }
+ if (num < 0) {
+ emsgf(_("E5070: Character number must not be less than zero"));
+ return;
+ }
+ if (num > INT_MAX) {
+ emsgf(_("E5071: Character number must not be greater than INT_MAX (%i)"),
+ INT_MAX);
+ return;
+ }
+
+ char buf[MB_MAXBYTES];
+ const int len = utf_char2bytes((int)num, (char_u *)buf);
+
rettv->v_type = VAR_STRING;
- rettv->vval.v_string = vim_strsave(buf);
+ rettv->vval.v_string = xmemdupz(buf, (size_t)len);
}
/*
@@ -13204,21 +13204,20 @@ static void f_remove(typval_T *argvars, typval_T *rettv, FunPtr fptr)
long end;
dict_T *d;
dictitem_T *di;
- const char *const arg_errmsg = _("remove() argument");
- const size_t arg_errmsg_len = strlen(arg_errmsg);
+ const char *const arg_errmsg = N_("remove() argument");
if (argvars[0].v_type == VAR_DICT) {
if (argvars[2].v_type != VAR_UNKNOWN) {
EMSG2(_(e_toomanyarg), "remove()");
} else if ((d = argvars[0].vval.v_dict) != NULL
- && !tv_check_lock(d->dv_lock, arg_errmsg, arg_errmsg_len)) {
+ && !tv_check_lock(d->dv_lock, arg_errmsg, TV_TRANSLATE)) {
const char *key = tv_get_string_chk(&argvars[1]);
if (key != NULL) {
di = tv_dict_find(d, key, -1);
if (di == NULL) {
EMSG2(_(e_dictkey), key);
- } else if (!var_check_fixed(di->di_flags, arg_errmsg, arg_errmsg_len)
- && !var_check_ro(di->di_flags, arg_errmsg, arg_errmsg_len)) {
+ } else if (!var_check_fixed(di->di_flags, arg_errmsg, TV_TRANSLATE)
+ && !var_check_ro(di->di_flags, arg_errmsg, TV_TRANSLATE)) {
*rettv = di->di_tv;
di->di_tv = TV_INITIAL_VALUE;
tv_dict_item_remove(d, di);
@@ -13231,7 +13230,7 @@ static void f_remove(typval_T *argvars, typval_T *rettv, FunPtr fptr)
} else if (argvars[0].v_type != VAR_LIST) {
EMSG2(_(e_listdictarg), "remove()");
} else if ((l = argvars[0].vval.v_list) != NULL
- && !tv_check_lock(l->lv_lock, arg_errmsg, arg_errmsg_len)) {
+ && !tv_check_lock(l->lv_lock, arg_errmsg, TV_TRANSLATE)) {
bool error = false;
idx = tv_get_number_chk(&argvars[1], &error);
@@ -13415,14 +13414,12 @@ static void f_resolve(typval_T *argvars, typval_T *rettv, FunPtr fptr)
q = (char *)path_tail((char_u *)p);
}
if (q > p && !path_is_absolute_path((const char_u *)buf)) {
- // Symlink is relative to directory of argument.
+ // Symlink is relative to directory of argument. Replace the
+ // symlink with the resolved name in the same directory.
const size_t p_len = strlen(p);
const size_t buf_len = strlen(buf);
- cpy = xmalloc(p_len + buf_len + 1);
- memcpy(cpy, p, p_len);
- memcpy(path_tail((char_u *)cpy), buf, buf_len + 1);
- xfree(p);
- p = cpy;
+ p = xrealloc(p, p_len + buf_len + 1);
+ memcpy(path_tail((char_u *)p), buf, buf_len + 1);
} else {
xfree(p);
p = xstrdup(buf);
@@ -13504,14 +13501,12 @@ static void f_resolve(typval_T *argvars, typval_T *rettv, FunPtr fptr)
*/
static void f_reverse(typval_T *argvars, typval_T *rettv, FunPtr fptr)
{
- const char *const arg_errmsg = _("reverse() argument");
- const size_t arg_errmsg_len = strlen(arg_errmsg);
-
list_T *l;
if (argvars[0].v_type != VAR_LIST) {
EMSG2(_(e_listarg), "reverse()");
} else if ((l = argvars[0].vval.v_list) != NULL
- && !tv_check_lock(l->lv_lock, arg_errmsg, arg_errmsg_len)) {
+ && !tv_check_lock(l->lv_lock, N_("reverse() argument"),
+ TV_TRANSLATE)) {
listitem_T *li = l->lv_last;
l->lv_first = l->lv_last = NULL;
l->lv_len = 0;
@@ -13789,7 +13784,7 @@ static void f_rpcrequest(typval_T *argvars, typval_T *rettv, FunPtr fptr)
restore_funccal(save_funccalp);
}
- if (err.set) {
+ if (ERROR_SET(&err)) {
nvim_err_writeln(cstr_as_string(err.msg));
goto end;
}
@@ -13800,6 +13795,7 @@ static void f_rpcrequest(typval_T *argvars, typval_T *rettv, FunPtr fptr)
end:
api_free_object(result);
+ api_clear_error(&err);
}
// "rpcstart()" function (DEPRECATED)
@@ -14307,7 +14303,7 @@ static void f_serverstop(typval_T *argvars, typval_T *rettv, FunPtr fptr)
return;
}
- if (argvars[0].v_type == VAR_UNKNOWN || argvars[0].v_type != VAR_STRING) {
+ if (argvars[0].v_type != VAR_STRING) {
EMSG(_(e_invarg));
return;
}
@@ -14331,7 +14327,7 @@ static void f_setbufvar(typval_T *argvars, typval_T *rettv, FunPtr fptr)
buf_T *const buf = get_buf_tv(&argvars[0], false);
typval_T *varp = &argvars[2];
- if (buf != NULL && varname != NULL && varp != NULL) {
+ if (buf != NULL && varname != NULL) {
if (*varname == '&') {
long numval;
bool error = false;
@@ -14875,7 +14871,7 @@ static void f_settabvar(typval_T *argvars, typval_T *rettv, FunPtr fptr)
const char *const varname = tv_get_string_chk(&argvars[1]);
typval_T *const varp = &argvars[2];
- if (varname != NULL && varp != NULL && tp != NULL) {
+ if (varname != NULL && tp != NULL) {
tabpage_T *const save_curtab = curtab;
goto_tabpage_tp(tp, false, false);
@@ -15203,16 +15199,14 @@ static void do_sort_uniq(typval_T *argvars, typval_T *rettv, bool sort)
sortinfo = &info;
const char *const arg_errmsg = (sort
- ? _("sort() argument")
- : _("uniq() argument"));
- const size_t arg_errmsg_len = strlen(arg_errmsg);
+ ? N_("sort() argument")
+ : N_("uniq() argument"));
if (argvars[0].v_type != VAR_LIST) {
EMSG2(_(e_listarg), sort ? "sort()" : "uniq()");
} else {
l = argvars[0].vval.v_list;
- if (l == NULL
- || tv_check_lock(l->lv_lock, arg_errmsg, arg_errmsg_len)) {
+ if (l == NULL || tv_check_lock(l->lv_lock, arg_errmsg, TV_TRANSLATE)) {
goto theend;
}
rettv->vval.v_list = l;
@@ -16437,7 +16431,12 @@ static void f_taglist(typval_T *argvars, typval_T *rettv, FunPtr fptr)
return;
}
- (void)get_tags(tv_list_alloc_ret(rettv), (char_u *)tag_pattern);
+ const char *fname = NULL;
+ if (argvars[1].v_type != VAR_UNKNOWN) {
+ fname = tv_get_string(&argvars[1]);
+ }
+ (void)get_tags(tv_list_alloc_ret(rettv), (char_u *)tag_pattern,
+ (char_u *)fname);
}
/*
@@ -16526,11 +16525,13 @@ static void f_termopen(typval_T *argvars, typval_T *rettv, FunPtr fptr)
curbuf->b_p_swf = false;
(void)setfname(curbuf, (char_u *)buf, NULL, true);
// Save the job id and pid in b:terminal_job_{id,pid}
- Error err;
+ Error err = ERROR_INIT;
dict_set_var(curbuf->b_vars, cstr_as_string("terminal_job_id"),
INTEGER_OBJ(rettv->vval.v_number), false, false, &err);
+ api_clear_error(&err);
dict_set_var(curbuf->b_vars, cstr_as_string("terminal_job_pid"),
INTEGER_OBJ(pid), false, false, &err);
+ api_clear_error(&err);
Terminal *term = terminal_open(topts);
data->term = term;
@@ -16647,6 +16648,77 @@ static bool set_ref_in_callback(Callback *callback, int copyID,
return false;
}
+static void add_timer_info(typval_T *rettv, timer_T *timer)
+{
+ list_T *list = rettv->vval.v_list;
+ dict_T *dict = tv_dict_alloc();
+
+ tv_list_append_dict(list, dict);
+ tv_dict_add_nr(dict, S_LEN("id"), timer->timer_id);
+ tv_dict_add_nr(dict, S_LEN("time"), timer->timeout);
+ tv_dict_add_nr(dict, S_LEN("paused"), timer->paused);
+
+ tv_dict_add_nr(dict, S_LEN("repeat"),
+ (timer->repeat_count < 0 ? -1 : timer->repeat_count));
+
+ dictitem_T *di = tv_dict_item_alloc("callback");
+ if (tv_dict_add(dict, di) == FAIL) {
+ xfree(di);
+ return;
+ }
+
+ if (timer->callback.type == kCallbackPartial) {
+ di->di_tv.v_type = VAR_PARTIAL;
+ di->di_tv.vval.v_partial = timer->callback.data.partial;
+ timer->callback.data.partial->pt_refcount++;
+ } else if (timer->callback.type == kCallbackFuncref) {
+ di->di_tv.v_type = VAR_FUNC;
+ di->di_tv.vval.v_string = vim_strsave(timer->callback.data.funcref);
+ }
+ di->di_tv.v_lock = 0;
+}
+
+static void add_timer_info_all(typval_T *rettv)
+{
+ timer_T *timer;
+ map_foreach_value(timers, timer, {
+ if (!timer->stopped) {
+ add_timer_info(rettv, timer);
+ }
+ })
+}
+
+/// "timer_info([timer])" function
+static void f_timer_info(typval_T *argvars, typval_T *rettv, FunPtr fptr)
+{
+ tv_list_alloc_ret(rettv);
+ if (argvars[0].v_type != VAR_UNKNOWN) {
+ if (argvars[0].v_type != VAR_NUMBER) {
+ EMSG(_(e_number_exp));
+ return;
+ }
+ timer_T *timer = pmap_get(uint64_t)(timers, tv_get_number(&argvars[0]));
+ if (timer != NULL && !timer->stopped) {
+ add_timer_info(rettv, timer);
+ }
+ } else {
+ add_timer_info_all(rettv);
+ }
+}
+
+/// "timer_pause(timer, paused)" function
+static void f_timer_pause(typval_T *argvars, typval_T *unused, FunPtr fptr)
+{
+ if (argvars[0].v_type != VAR_NUMBER) {
+ EMSG(_(e_number_exp));
+ return;
+ }
+ int paused = (bool)tv_get_number(&argvars[1]);
+ timer_T *timer = pmap_get(uint64_t)(timers, tv_get_number(&argvars[0]));
+ if (timer != NULL) {
+ timer->paused = paused;
+ }
+}
/// "timer_start(timeout, callback, opts)" function
static void f_timer_start(typval_T *argvars, typval_T *rettv, FunPtr fptr)
@@ -16681,6 +16753,7 @@ static void f_timer_start(typval_T *argvars, typval_T *rettv, FunPtr fptr)
timer = xmalloc(sizeof *timer);
timer->refcount = 1;
timer->stopped = false;
+ timer->paused = false;
timer->repeat_count = repeat;
timer->timeout = timeout;
timer->timer_id = last_timer_id++;
@@ -16690,8 +16763,7 @@ static void f_timer_start(typval_T *argvars, typval_T *rettv, FunPtr fptr)
timer->tw.events = multiqueue_new_child(main_loop.events);
// if main loop is blocked, don't queue up multiple events
timer->tw.blockable = true;
- time_watcher_start(&timer->tw, timer_due_cb, timeout,
- timeout * (repeat != 1));
+ time_watcher_start(&timer->tw, timer_due_cb, timeout, timeout);
pmap_put(uint64_t)(timers, timer->timer_id, timer);
rettv->vval.v_number = timer->timer_id;
@@ -16715,13 +16787,19 @@ static void f_timer_stop(typval_T *argvars, typval_T *rettv, FunPtr fptr)
timer_stop(timer);
}
+static void f_timer_stopall(typval_T *argvars, typval_T *unused, FunPtr fptr)
+{
+ timer_stop_all();
+}
+
// invoked on the main loop
static void timer_due_cb(TimeWatcher *tw, void *data)
{
timer_T *timer = (timer_T *)data;
- if (timer->stopped) {
+ if (timer->stopped || timer->paused) {
return;
}
+
timer->refcount++;
// if repeat was negative repeat forever
if (timer->repeat_count >= 0 && --timer->repeat_count == 0) {
@@ -16774,7 +16852,7 @@ static void timer_decref(timer_T *timer)
}
}
-void timer_teardown(void)
+static void timer_stop_all(void)
{
timer_T *timer;
map_foreach_value(timers, timer, {
@@ -16782,35 +16860,19 @@ void timer_teardown(void)
})
}
+void timer_teardown(void)
+{
+ timer_stop_all();
+}
+
/*
* "tolower(string)" function
*/
static void f_tolower(typval_T *argvars, typval_T *rettv, FunPtr fptr)
{
- char_u *p = (char_u *)xstrdup(tv_get_string(&argvars[0]));
rettv->v_type = VAR_STRING;
- rettv->vval.v_string = p;
-
- while (*p != NUL) {
- int l;
-
- if (enc_utf8) {
- int c, lc;
-
- c = utf_ptr2char(p);
- lc = utf_tolower(c);
- l = utf_ptr2len(p);
- /* TODO: reallocate string when byte count changes. */
- if (utf_char2len(lc) == l)
- utf_char2bytes(lc, p);
- p += l;
- } else if (has_mbyte && (l = (*mb_ptr2len)(p)) > 1)
- p += l; /* skip multi-byte character */
- else {
- *p = TOLOWER_LOC(*p); /* note that tolower() can be a macro */
- ++p;
- }
- }
+ rettv->vval.v_string = (char_u *)strcase_save(tv_get_string(&argvars[0]),
+ false);
}
/*
@@ -16819,7 +16881,8 @@ static void f_tolower(typval_T *argvars, typval_T *rettv, FunPtr fptr)
static void f_toupper(typval_T *argvars, typval_T *rettv, FunPtr fptr)
{
rettv->v_type = VAR_STRING;
- rettv->vval.v_string = (char_u *)strup_save(tv_get_string(&argvars[0]));
+ rettv->vval.v_string = (char_u *)strcase_save(tv_get_string(&argvars[0]),
+ true);
}
/*
@@ -17288,7 +17351,7 @@ static bool write_list(FileDescriptor *const fp, const list_T *const list,
}
}
}
- if ((error = file_fsync(fp)) != 0) {
+ if ((error = file_flush(fp)) != 0) {
goto write_list_error;
}
return true;
@@ -17420,16 +17483,24 @@ static void f_writefile(typval_T *argvars, typval_T *rettv, FunPtr fptr)
bool binary = false;
bool append = false;
+ bool do_fsync = !!p_fs;
if (argvars[2].v_type != VAR_UNKNOWN) {
const char *const flags = tv_get_string_chk(&argvars[2]);
if (flags == NULL) {
return;
}
- if (strchr(flags, 'b')) {
- binary = true;
- }
- if (strchr(flags, 'a')) {
- append = true;
+ for (const char *p = flags; *p; p++) {
+ switch (*p) {
+ case 'b': { binary = true; break; }
+ case 'a': { append = true; break; }
+ case 's': { do_fsync = true; break; }
+ case 'S': { do_fsync = false; break; }
+ default: {
+ // Using %s, p and not %c, *p to preserve multibyte characters
+ emsgf(_("E5060: Unknown flag: %s"), p);
+ return;
+ }
+ }
}
}
@@ -17438,21 +17509,21 @@ static void f_writefile(typval_T *argvars, typval_T *rettv, FunPtr fptr)
if (fname == NULL) {
return;
}
- FileDescriptor *fp;
+ FileDescriptor fp;
int error;
rettv->vval.v_number = -1;
if (*fname == NUL) {
EMSG(_("E482: Can't open file with an empty name"));
- } else if ((fp = file_open_new(&error, fname,
- ((append ? kFileAppend : kFileTruncate)
- | kFileCreate), 0666)) == NULL) {
+ } else if ((error = file_open(&fp, fname,
+ ((append ? kFileAppend : kFileTruncate)
+ | kFileCreate), 0666)) != 0) {
emsgf(_("E482: Can't open file %s for writing: %s"),
fname, os_strerror(error));
} else {
- if (write_list(fp, argvars[0].vval.v_list, binary)) {
+ if (write_list(&fp, argvars[0].vval.v_list, binary)) {
rettv->vval.v_number = 0;
}
- if ((error = file_free(fp)) != 0) {
+ if ((error = file_close(&fp, do_fsync)) != 0) {
emsgf(_("E80: Error when closing file %s: %s"),
fname, os_strerror(error));
}
@@ -18884,24 +18955,43 @@ static void set_var(const char *name, const size_t name_len, typval_T *const tv,
///
/// @param[in] flags di_flags attribute value.
/// @param[in] name Variable name, for use in error message.
-/// @param[in] name_len Variable name length.
+/// @param[in] name_len Variable name length. Use #TV_TRANSLATE to translate
+/// variable name and compute the length. Use #TV_CSTRING
+/// to compute the length with strlen() without
+/// translating.
+///
+/// Both #TV_… values are used for optimization purposes:
+/// variable name with its length is needed only in case
+/// of error, when no error occurs computing them is
+/// a waste of CPU resources. This especially applies to
+/// gettext.
///
/// @return True if variable is read-only: either always or in sandbox when
/// sandbox is enabled, false otherwise.
-bool var_check_ro(const int flags, const char *const name,
- const size_t name_len)
+bool var_check_ro(const int flags, const char *name,
+ size_t name_len)
FUNC_ATTR_WARN_UNUSED_RESULT FUNC_ATTR_NONNULL_ALL
{
+ const char *error_message = NULL;
if (flags & DI_FLAGS_RO) {
- emsgf(_(e_readonlyvar), (int)name_len, name);
- return true;
+ error_message = N_(e_readonlyvar);
+ } else if ((flags & DI_FLAGS_RO_SBX) && sandbox) {
+ error_message = N_("E794: Cannot set variable in the sandbox: \"%.*s\"");
}
- if ((flags & DI_FLAGS_RO_SBX) && sandbox) {
- emsgf(_("E794: Cannot set variable in the sandbox: \"%.*s\""),
- (int)name_len, name);
- return true;
+
+ if (error_message == NULL) {
+ return false;
}
- return false;
+ if (name_len == TV_TRANSLATE) {
+ name = _(name);
+ name_len = strlen(name);
+ } else if (name_len == TV_CSTRING) {
+ name_len = strlen(name);
+ }
+
+ emsgf(_(error_message), (int)name_len, name);
+
+ return true;
}
/// Check whether variable is fixed (DI_FLAGS_FIX)
@@ -18910,14 +19000,29 @@ bool var_check_ro(const int flags, const char *const name,
///
/// @param[in] flags di_flags attribute value.
/// @param[in] name Variable name, for use in error message.
-/// @param[in] name_len Variable name length.
+/// @param[in] name_len Variable name length. Use #TV_TRANSLATE to translate
+/// variable name and compute the length. Use #TV_CSTRING
+/// to compute the length with strlen() without
+/// translating.
+///
+/// Both #TV_… values are used for optimization purposes:
+/// variable name with its length is needed only in case
+/// of error, when no error occurs computing them is
+/// a waste of CPU resources. This especially applies to
+/// gettext.
///
/// @return True if variable is fixed, false otherwise.
-static bool var_check_fixed(const int flags, const char *const name,
- const size_t name_len)
+static bool var_check_fixed(const int flags, const char *name,
+ size_t name_len)
FUNC_ATTR_WARN_UNUSED_RESULT FUNC_ATTR_NONNULL_ALL
{
if (flags & DI_FLAGS_FIX) {
+ if (name_len == TV_TRANSLATE) {
+ name = _(name);
+ name_len = strlen(name);
+ } else if (name_len == TV_CSTRING) {
+ name_len = strlen(name);
+ }
emsgf(_("E795: Cannot delete variable %.*s"), (int)name_len, name);
return true;
}
@@ -19388,8 +19493,9 @@ void ex_function(exarg_T *eap)
* interrupt, or an exception.
*/
if (!aborting()) {
- if (!eap->skip && fudi.fd_newkey != NULL)
+ if (fudi.fd_newkey != NULL) {
EMSG2(_(e_dictkey), fudi.fd_newkey);
+ }
xfree(fudi.fd_newkey);
return;
} else
@@ -19724,12 +19830,12 @@ void ex_function(exarg_T *eap)
}
if (fudi.fd_di == NULL) {
if (tv_check_lock(fudi.fd_dict->dv_lock, (const char *)eap->arg,
- STRLEN(eap->arg))) {
+ TV_CSTRING)) {
// Can't add a function to a locked dictionary
goto erret;
}
} else if (tv_check_lock(fudi.fd_di->di_tv.v_lock, (const char *)eap->arg,
- STRLEN(eap->arg))) {
+ TV_CSTRING)) {
// Can't change an existing function if it is locked
goto erret;
}
@@ -20711,13 +20817,7 @@ void func_unref(char_u *name)
abort();
#endif
}
- if (fp != NULL && --fp->uf_refcount <= 0) {
- // Only delete it when it's not being used. Otherwise it's done
- // when "uf_calls" becomes zero.
- if (fp->uf_calls == 0) {
- func_clear_free(fp, false);
- }
- }
+ func_ptr_unref(fp);
}
/// Unreference a Function: decrement the reference count and free it when it
@@ -20979,8 +21079,8 @@ void call_user_func(ufunc_T *fp, int argcount, typval_T *argvars,
char *s = tofree;
emsg_off--;
if (s != NULL) {
+ char buf[MSG_BUF_LEN];
if (vim_strsize((char_u *)s) > MSG_BUF_CLEN) {
- char buf[MSG_BUF_LEN];
trunc_string((char_u *)s, (char_u *)buf, MSG_BUF_CLEN,
sizeof(buf));
s = buf;
diff --git a/src/nvim/eval.lua b/src/nvim/eval.lua
index e3c5981b32..21b5bbb139 100644
--- a/src/nvim/eval.lua
+++ b/src/nvim/eval.lua
@@ -300,14 +300,17 @@ return {
tabpagenr={args={0, 1}},
tabpagewinnr={args={1, 2}},
tagfiles={},
- taglist={args=1},
+ taglist={args={1, 2}},
tan={args=1, func="float_op_wrapper", data="&tan"},
tanh={args=1, func="float_op_wrapper", data="&tanh"},
tempname={},
termopen={args={1, 2}},
test_garbagecollect_now={},
+ timer_info={args={0,1}},
+ timer_pause={args=2},
timer_start={args={2,3}},
timer_stop={args=1},
+ timer_stopall={args=0},
tolower={args=1},
toupper={args=1},
tr={args=3},
diff --git a/src/nvim/eval/decode.c b/src/nvim/eval/decode.c
index 3cb68e093b..8905317f15 100644
--- a/src/nvim/eval/decode.c
+++ b/src/nvim/eval/decode.c
@@ -1,3 +1,6 @@
+// This is an open source non-commercial project. Dear PVS-Studio, please check
+// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
+
#include <stddef.h>
#include <msgpack.h>
@@ -222,8 +225,6 @@ static inline int json_decoder_pop(ValuesStackItem obj,
/// Parse JSON double-quoted string
///
-/// @param[in] conv Defines conversion necessary to convert UTF-8 string to
-/// &encoding.
/// @param[in] buf Buffer being converted.
/// @param[in] buf_len Length of the buffer.
/// @param[in,out] pp Pointer to the start of the string. Must point to '"'.
@@ -240,8 +241,7 @@ static inline int json_decoder_pop(ValuesStackItem obj,
/// value when decoder is restarted, otherwise unused.
///
/// @return OK in case of success, FAIL in case of error.
-static inline int parse_json_string(vimconv_T *const conv,
- const char *const buf, const size_t buf_len,
+static inline int parse_json_string(const char *const buf, const size_t buf_len,
const char **const pp,
ValuesStack *const stack,
ContainerStack *const container_stack,
@@ -416,20 +416,6 @@ static inline int parse_json_string(vimconv_T *const conv,
}
PUT_FST_IN_PAIR(fst_in_pair, str_end);
#undef PUT_FST_IN_PAIR
- if (conv->vc_type != CONV_NONE) {
- size_t str_len = (size_t) (str_end - str);
- char *const new_str = (char *) string_convert(conv, (char_u *) str,
- &str_len);
- if (new_str == NULL) {
- emsgf(_("E474: Failed to convert string \"%.*s\" from UTF-8"),
- (int) str_len, str);
- xfree(str);
- goto parse_json_string_fail;
- }
- xfree(str);
- str = new_str;
- str_end = new_str + str_len;
- }
if (hasnul) {
typval_T obj;
list_T *const list = tv_list_alloc();
@@ -626,9 +612,6 @@ int json_decode_string(const char *const buf, const size_t buf_len,
EMSG(_("E474: Attempt to decode a blank string"));
return FAIL;
}
- vimconv_T conv = { .vc_type = CONV_NONE };
- convert_setup(&conv, (char_u *) "utf-8", p_enc);
- conv.vc_fail = true;
int ret = OK;
ValuesStack stack = KV_INITIAL_VALUE;
ContainerStack container_stack = KV_INITIAL_VALUE;
@@ -774,7 +757,7 @@ json_decode_string_cycle_start:
break;
}
case '"': {
- if (parse_json_string(&conv, buf, buf_len, &p, &stack, &container_stack,
+ if (parse_json_string(buf, buf_len, &p, &stack, &container_stack,
&next_map_special, &didcomma, &didcolon)
== FAIL) {
// Error message was already given
@@ -973,7 +956,13 @@ int msgpack_to_vim(const msgpack_object mobj, typval_T *const rettv)
}
break;
}
- case MSGPACK_OBJECT_FLOAT: {
+#ifdef NVIM_MSGPACK_HAS_FLOAT32
+ case MSGPACK_OBJECT_FLOAT32:
+ case MSGPACK_OBJECT_FLOAT64:
+#else
+ case MSGPACK_OBJECT_FLOAT:
+#endif
+ {
*rettv = (typval_T) {
.v_type = VAR_FLOAT,
.v_lock = VAR_UNLOCKED,
diff --git a/src/nvim/eval/encode.c b/src/nvim/eval/encode.c
index 26f9aaa27d..742497c1ca 100644
--- a/src/nvim/eval/encode.c
+++ b/src/nvim/eval/encode.c
@@ -1,3 +1,6 @@
+// This is an open source non-commercial project. Dear PVS-Studio, please check
+// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
+
/// @file encode.c
///
/// File containing functions for encoding and decoding VimL values.
@@ -11,7 +14,7 @@
#include <math.h>
#include "nvim/eval/encode.h"
-#include "nvim/buffer_defs.h" // vimconv_T
+#include "nvim/buffer_defs.h"
#include "nvim/eval.h"
#include "nvim/eval/typval.h"
#include "nvim/garray.h"
@@ -29,10 +32,6 @@
#define utf_ptr2char(b) utf_ptr2char((char_u *)b)
#define utf_ptr2len(b) ((size_t)utf_ptr2len((char_u *)b))
#define utf_char2len(b) ((size_t)utf_char2len(b))
-#define string_convert(a, b, c) \
- ((char *)string_convert((vimconv_T *)a, (char_u *)b, c))
-#define convert_setup(vcp, from, to) \
- (convert_setup(vcp, (char_u *)from, (char_u *)to))
const char *const encode_special_var_names[] = {
[kSpecialVarNull] = "null",
@@ -183,9 +182,9 @@ static int conv_error(const char *const msg, const MPConvStack *const mpstack,
}
}
}
- EMSG3(msg, objname, (kv_size(*mpstack) == 0
- ? _("itself")
- : (char *) msg_ga.ga_data));
+ emsgf(msg, _(objname), (kv_size(*mpstack) == 0
+ ? _("itself")
+ : (char *)msg_ga.ga_data));
ga_clear(&msg_ga);
return FAIL;
}
@@ -537,17 +536,6 @@ int encode_read_from_list(ListReaderState *const state, char *const buf,
} \
} while (0)
-/// Last used p_enc value
-///
-/// Generic pointer: it is not used as a string, only pointer comparisons are
-/// performed. Must not be freed.
-static const void *last_p_enc = NULL;
-
-/// Conversion setup for converting from last_p_enc to UTF-8
-static vimconv_T p_enc_conv = {
- .vc_type = CONV_NONE,
-};
-
/// Escape sequences used in JSON
static const char escapes[][3] = {
[BS] = "\\b",
@@ -579,33 +567,15 @@ static inline int convert_to_json_string(garray_T *const gap,
} else {
size_t utf_len = len;
char *tofree = NULL;
- if (last_p_enc != (const void *) p_enc) {
- p_enc_conv.vc_type = CONV_NONE;
- convert_setup(&p_enc_conv, p_enc, "utf-8");
- p_enc_conv.vc_fail = true;
- last_p_enc = p_enc;
- }
- if (p_enc_conv.vc_type != CONV_NONE) {
- tofree = string_convert(&p_enc_conv, buf, &utf_len);
- if (tofree == NULL) {
- emsgf(_("E474: Failed to convert string \"%.*s\" to UTF-8"),
- utf_len, utf_buf);
- return FAIL;
- }
- utf_buf = tofree;
- }
size_t str_len = 0;
- // Encode character as \u0000 if
- // 1. It is an ASCII control character (0x0 .. 0x1F, 0x7F).
- // 2. &encoding is not UTF-8 and code point is above 0x7F.
- // 3. &encoding is UTF-8 and code point is not printable according to
- // utf_printable().
- // This is done to make it possible to :echo values when &encoding is not
- // UTF-8.
-#define ENCODE_RAW(p_enc_conv, ch) \
- (ch >= 0x20 && (p_enc_conv.vc_type == CONV_NONE \
- ? utf_printable(ch) \
- : ch < 0x7F))
+ // Encode character as \uNNNN if
+ // 1. It is an ASCII control character (0x0 .. 0x1F; 0x7F not
+ // utf_printable and thus not checked specially).
+ // 2. Code point is not printable according to utf_printable().
+ // This is done to make resulting values displayable on screen also not from
+ // Neovim.
+#define ENCODE_RAW(ch) \
+ (ch >= 0x20 && utf_printable(ch))
for (size_t i = 0; i < utf_len;) {
const int ch = utf_ptr2char(utf_buf + i);
const size_t shift = (ch == 0? 1: utf_ptr2len(utf_buf + i));
@@ -636,7 +606,7 @@ static inline int convert_to_json_string(garray_T *const gap,
utf_len - (i - shift), utf_buf + i - shift);
xfree(tofree);
return FAIL;
- } else if (ENCODE_RAW(p_enc_conv, ch)) {
+ } else if (ENCODE_RAW(ch)) {
str_len += shift;
} else {
str_len += ((sizeof("\\u1234") - 1)
@@ -666,7 +636,7 @@ static inline int convert_to_json_string(garray_T *const gap,
break;
}
default: {
- if (ENCODE_RAW(p_enc_conv, ch)) {
+ if (ENCODE_RAW(ch)) {
ga_concat_len(gap, utf_buf + i, shift);
} else if (ch < SURROGATE_FIRST_CHAR) {
ga_concat_len(gap, ((const char[]) {
@@ -823,7 +793,7 @@ char *encode_tv2string(typval_T *tv, size_t *len)
garray_T ga;
ga_init(&ga, (int)sizeof(char), 80);
const int evs_ret = encode_vim_to_string(&ga, tv,
- "encode_tv2string() argument");
+ N_("encode_tv2string() argument"));
(void)evs_ret;
assert(evs_ret == OK);
did_echo_string_emsg = false;
@@ -851,7 +821,7 @@ char *encode_tv2echo(typval_T *tv, size_t *len)
ga_concat(&ga, tv->vval.v_string);
}
} else {
- const int eve_ret = encode_vim_to_echo(&ga, tv, ":echo argument");
+ const int eve_ret = encode_vim_to_echo(&ga, tv, N_(":echo argument"));
(void)eve_ret;
assert(eve_ret == OK);
}
@@ -874,7 +844,8 @@ char *encode_tv2json(typval_T *tv, size_t *len)
{
garray_T ga;
ga_init(&ga, (int)sizeof(char), 80);
- const int evj_ret = encode_vim_to_json(&ga, tv, "encode_tv2json() argument");
+ const int evj_ret = encode_vim_to_json(&ga, tv,
+ N_("encode_tv2json() argument"));
if (!evj_ret) {
ga_clear(&ga);
}
diff --git a/src/nvim/eval/executor.c b/src/nvim/eval/executor.c
index ec6c86ac64..91bb61323f 100644
--- a/src/nvim/eval/executor.c
+++ b/src/nvim/eval/executor.c
@@ -1,3 +1,6 @@
+// This is an open source non-commercial project. Dear PVS-Studio, please check
+// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
+
#include "nvim/eval/typval.h"
#include "nvim/eval/executor.h"
#include "nvim/eval.h"
diff --git a/src/nvim/eval/gc.c b/src/nvim/eval/gc.c
index 5ce52ddd70..2bbf78d827 100644
--- a/src/nvim/eval/gc.c
+++ b/src/nvim/eval/gc.c
@@ -1,3 +1,6 @@
+// This is an open source non-commercial project. Dear PVS-Studio, please check
+// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
+
#include "nvim/eval/typval.h"
#include "nvim/eval/gc.h"
diff --git a/src/nvim/eval/typval.c b/src/nvim/eval/typval.c
index 779bb18175..786b766689 100644
--- a/src/nvim/eval/typval.c
+++ b/src/nvim/eval/typval.c
@@ -1,3 +1,6 @@
+// This is an open source non-commercial project. Dear PVS-Studio, please check
+// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
+
#include <stdio.h>
#include <stddef.h>
#include <string.h>
@@ -136,7 +139,7 @@ void tv_list_watch_fix(list_T *const l, const listitem_T *const item)
///
/// @return [allocated] new list.
list_T *tv_list_alloc(void)
- FUNC_ATTR_NONNULL_RET FUNC_ATTR_MALLOC
+ FUNC_ATTR_NONNULL_RET
{
list_T *const list = xcalloc(1, sizeof(list_T));
@@ -1011,7 +1014,6 @@ void tv_dict_item_free(dictitem_T *const item)
/// @return [allocated] new dictionary item.
static dictitem_T *tv_dict_item_copy(dictitem_T *const di)
FUNC_ATTR_NONNULL_RET FUNC_ATTR_NONNULL_ALL FUNC_ATTR_WARN_UNUSED_RESULT
- FUNC_ATTR_MALLOC
{
dictitem_T *const new_di = tv_dict_item_alloc((const char *)di->di_key);
tv_copy(&di->di_tv, &new_di->di_tv);
@@ -1040,7 +1042,7 @@ void tv_dict_item_remove(dict_T *const dict, dictitem_T *const item)
///
/// @return [allocated] new dictionary.
dict_T *tv_dict_alloc(void)
- FUNC_ATTR_NONNULL_RET FUNC_ATTR_MALLOC FUNC_ATTR_WARN_UNUSED_RESULT
+ FUNC_ATTR_NONNULL_RET FUNC_ATTR_WARN_UNUSED_RESULT
{
dict_T *const d = xmalloc(sizeof(dict_T));
@@ -1577,7 +1579,7 @@ void tv_dict_set_keys_readonly(dict_T *const dict)
///
/// @return [allocated] pointer to the created list.
list_T *tv_list_alloc_ret(typval_T *const ret_tv)
- FUNC_ATTR_NONNULL_ALL FUNC_ATTR_MALLOC
+ FUNC_ATTR_NONNULL_ALL
{
list_T *const l = tv_list_alloc();
ret_tv->vval.v_list = l;
@@ -1799,11 +1801,13 @@ static inline void _nothing_conv_dict_end(typval_T *const tv,
#define TYPVAL_ENCODE_NAME nothing
#define TYPVAL_ENCODE_FIRST_ARG_TYPE const void *const
#define TYPVAL_ENCODE_FIRST_ARG_NAME ignored
+#define TYPVAL_ENCODE_TRANSLATE_OBJECT_NAME
#include "nvim/eval/typval_encode.c.h"
#undef TYPVAL_ENCODE_SCOPE
#undef TYPVAL_ENCODE_NAME
#undef TYPVAL_ENCODE_FIRST_ARG_TYPE
#undef TYPVAL_ENCODE_FIRST_ARG_NAME
+#undef TYPVAL_ENCODE_TRANSLATE_OBJECT_NAME
#undef TYPVAL_ENCODE_ALLOW_SPECIALS
#undef TYPVAL_ENCODE_CONV_NIL
@@ -1838,8 +1842,13 @@ static inline void _nothing_conv_dict_end(typval_T *const tv,
void tv_clear(typval_T *const tv)
{
if (tv != NULL && tv->v_type != VAR_UNKNOWN) {
- const int evn_ret = encode_vim_to_nothing(NULL, tv,
- _("tv_clear() argument"));
+ // WARNING: do not translate the string here, gettext is slow and function
+ // is used *very* often. At the current state encode_vim_to_nothing() does
+ // not error out and does not use the argument anywhere.
+ //
+ // If situation changes and this argument will be used, translate it in the
+ // place where it is used.
+ const int evn_ret = encode_vim_to_nothing(NULL, tv, "tv_clear() argument");
(void)evn_ret;
assert(evn_ret == OK);
}
@@ -2042,11 +2051,20 @@ bool tv_islocked(const typval_T *const tv)
///
/// @param[in] lock Lock status.
/// @param[in] name Variable name, used in the error message.
-/// @param[in] name_len Variable name length.
+/// @param[in] name_len Variable name length. Use #TV_TRANSLATE to translate
+/// variable name and compute the length. Use #TV_CSTRING
+/// to compute the length with strlen() without
+/// translating.
+///
+/// Both #TV_… values are used for optimization purposes:
+/// variable name with its length is needed only in case
+/// of error, when no error occurs computing them is
+/// a waste of CPU resources. This especially applies to
+/// gettext.
///
/// @return true if variable is locked, false otherwise.
-bool tv_check_lock(const VarLockStatus lock, const char *const name,
- const size_t name_len)
+bool tv_check_lock(const VarLockStatus lock, const char *name,
+ size_t name_len)
FUNC_ATTR_WARN_UNUSED_RESULT
{
const char *error_message = NULL;
@@ -2065,10 +2083,17 @@ bool tv_check_lock(const VarLockStatus lock, const char *const name,
}
assert(error_message != NULL);
- const char *const unknown_name = _("Unknown");
+ if (name == NULL) {
+ name = _("Unknown");
+ name_len = strlen(name);
+ } else if (name_len == TV_TRANSLATE) {
+ name = _(name);
+ name_len = strlen(name);
+ } else if (name_len == TV_CSTRING) {
+ name_len = strlen(name);
+ }
- emsgf(_(error_message), (name != NULL ? name_len : strlen(unknown_name)),
- (name != NULL ? name : unknown_name));
+ emsgf(_(error_message), (int)name_len, name);
return true;
}
diff --git a/src/nvim/eval/typval.h b/src/nvim/eval/typval.h
index 7eab22bc12..0f659727ee 100644
--- a/src/nvim/eval/typval.h
+++ b/src/nvim/eval/typval.h
@@ -17,6 +17,7 @@
#include "nvim/pos.h" // for linenr_T
#include "nvim/gettext.h"
#include "nvim/message.h"
+#include "nvim/macros.h"
/// Type used for VimL VAR_NUMBER values
typedef int varnumber_T;
@@ -423,6 +424,23 @@ static inline bool tv_is_func(const typval_T tv)
return tv.v_type == VAR_FUNC || tv.v_type == VAR_PARTIAL;
}
+/// Specify that argument needs to be translated
+///
+/// Used for size_t length arguments to avoid calling gettext() and strlen()
+/// unless needed.
+#define TV_TRANSLATE (SIZE_MAX)
+
+/// Specify that argument is a NUL-terminated C string
+///
+/// Used for size_t length arguments to avoid calling strlen() unless needed.
+#define TV_CSTRING (SIZE_MAX - 1)
+
+#ifdef UNIT_TESTING
+// Do not use enum constants, see commit message.
+EXTERN const size_t kTVCstring INIT(= TV_CSTRING);
+EXTERN const size_t kTVTranslate INIT(= TV_TRANSLATE);
+#endif
+
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "eval/typval.h.generated.h"
#endif
diff --git a/src/nvim/eval/typval_encode.c.h b/src/nvim/eval/typval_encode.c.h
index ad54eef4a0..b4a70fb188 100644
--- a/src/nvim/eval/typval_encode.c.h
+++ b/src/nvim/eval/typval_encode.c.h
@@ -489,7 +489,7 @@ static int _TYPVAL_ENCODE_CONVERT_ONE_VALUE(
}
if (is_string) {
TYPVAL_ENCODE_CONV_STR_STRING(tv, buf, len);
- } else {
+ } else { // -V523
TYPVAL_ENCODE_CONV_STRING(tv, buf, len);
}
xfree(buf);
@@ -611,7 +611,7 @@ _convert_one_value_regular_dict: {}
typval_encode_stop_converting_one_item:
return OK;
// Prevent “unused label” warnings.
- goto typval_encode_stop_converting_one_item;
+ goto typval_encode_stop_converting_one_item; // -V779
}
TYPVAL_ENCODE_SCOPE int _TYPVAL_ENCODE_ENCODE(
@@ -814,6 +814,6 @@ encode_vim_to__error_ret:
_mp_destroy(mpstack);
return FAIL;
// Prevent “unused label” warnings.
- goto typval_encode_stop_converting_one_item;
+ goto typval_encode_stop_converting_one_item; // -V779
}
#endif // NVIM_EVAL_TYPVAL_ENCODE_C_H
diff --git a/src/nvim/event/libuv_process.c b/src/nvim/event/libuv_process.c
index 3da0c386b4..3116adbde8 100644
--- a/src/nvim/event/libuv_process.c
+++ b/src/nvim/event/libuv_process.c
@@ -1,3 +1,6 @@
+// This is an open source non-commercial project. Dear PVS-Studio, please check
+// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
+
#include <assert.h>
#include <uv.h>
@@ -8,6 +11,7 @@
#include "nvim/event/process.h"
#include "nvim/event/libuv_process.h"
#include "nvim/log.h"
+#include "nvim/os/os.h"
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "event/libuv_process.c.generated.h"
@@ -24,6 +28,13 @@ int libuv_process_spawn(LibuvProcess *uvproc)
if (proc->detach) {
uvproc->uvopts.flags |= UV_PROCESS_DETACHED;
}
+#ifdef WIN32
+ // libuv collapses the argv to a CommandLineToArgvW()-style string. cmd.exe
+ // expects a different syntax (must be prepared by the caller before now).
+ if (os_shell_is_cmdexe(proc->argv[0])) {
+ uvproc->uvopts.flags |= UV_PROCESS_WINDOWS_VERBATIM_ARGUMENTS;
+ }
+#endif
uvproc->uvopts.exit_cb = exit_cb;
uvproc->uvopts.cwd = proc->cwd;
uvproc->uvopts.env = NULL;
diff --git a/src/nvim/event/loop.c b/src/nvim/event/loop.c
index 0e1775d01b..6963978581 100644
--- a/src/nvim/event/loop.c
+++ b/src/nvim/event/loop.c
@@ -1,3 +1,6 @@
+// This is an open source non-commercial project. Dear PVS-Studio, please check
+// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
+
#include <stdarg.h>
#include <stdint.h>
diff --git a/src/nvim/event/multiqueue.c b/src/nvim/event/multiqueue.c
index 79b4dd9458..a17bae31e3 100644
--- a/src/nvim/event/multiqueue.c
+++ b/src/nvim/event/multiqueue.c
@@ -1,3 +1,6 @@
+// This is an open source non-commercial project. Dear PVS-Studio, please check
+// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
+
// Multi-level queue for selective async event processing.
// Not threadsafe; access must be synchronized externally.
//
diff --git a/src/nvim/event/process.c b/src/nvim/event/process.c
index 4429a65f92..ffda10a494 100644
--- a/src/nvim/event/process.c
+++ b/src/nvim/event/process.c
@@ -1,3 +1,6 @@
+// This is an open source non-commercial project. Dear PVS-Studio, please check
+// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
+
#include <assert.h>
#include <stdlib.h>
diff --git a/src/nvim/event/rstream.c b/src/nvim/event/rstream.c
index 2737dad305..854af474b2 100644
--- a/src/nvim/event/rstream.c
+++ b/src/nvim/event/rstream.c
@@ -1,3 +1,6 @@
+// This is an open source non-commercial project. Dear PVS-Studio, please check
+// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
+
#include <assert.h>
#include <stdint.h>
#include <stdbool.h>
diff --git a/src/nvim/event/signal.c b/src/nvim/event/signal.c
index 11ce15a882..fec46da4ff 100644
--- a/src/nvim/event/signal.c
+++ b/src/nvim/event/signal.c
@@ -1,3 +1,6 @@
+// This is an open source non-commercial project. Dear PVS-Studio, please check
+// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
+
#include <uv.h>
#include "nvim/event/loop.h"
diff --git a/src/nvim/event/socket.c b/src/nvim/event/socket.c
index 8f9327f3d4..e536d79a2a 100644
--- a/src/nvim/event/socket.c
+++ b/src/nvim/event/socket.c
@@ -1,3 +1,6 @@
+// This is an open source non-commercial project. Dear PVS-Studio, please check
+// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
+
#include <assert.h>
#include <stdint.h>
diff --git a/src/nvim/event/stream.c b/src/nvim/event/stream.c
index 26083c20f4..860a957b3e 100644
--- a/src/nvim/event/stream.c
+++ b/src/nvim/event/stream.c
@@ -1,3 +1,6 @@
+// This is an open source non-commercial project. Dear PVS-Studio, please check
+// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
+
#include <assert.h>
#include <stdio.h>
#include <stdbool.h>
diff --git a/src/nvim/event/time.c b/src/nvim/event/time.c
index 77260546db..80289c27d1 100644
--- a/src/nvim/event/time.c
+++ b/src/nvim/event/time.c
@@ -1,3 +1,6 @@
+// This is an open source non-commercial project. Dear PVS-Studio, please check
+// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
+
#include <stdint.h>
#include <uv.h>
diff --git a/src/nvim/event/wstream.c b/src/nvim/event/wstream.c
index fc7aad8eb9..f453e5898d 100644
--- a/src/nvim/event/wstream.c
+++ b/src/nvim/event/wstream.c
@@ -1,3 +1,6 @@
+// This is an open source non-commercial project. Dear PVS-Studio, please check
+// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
+
#include <assert.h>
#include <stdint.h>
#include <stdbool.h>
diff --git a/src/nvim/ex_cmds.c b/src/nvim/ex_cmds.c
index 9a847a4c0a..7726e0fc6d 100644
--- a/src/nvim/ex_cmds.c
+++ b/src/nvim/ex_cmds.c
@@ -1,3 +1,6 @@
+// This is an open source non-commercial project. Dear PVS-Studio, please check
+// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
+
/*
* ex_cmds.c: some functions for command line commands
*/
@@ -2874,8 +2877,11 @@ void ex_z(exarg_T *eap)
if (end > curbuf->b_ml.ml_line_count)
end = curbuf->b_ml.ml_line_count;
- if (curs > curbuf->b_ml.ml_line_count)
+ if (curs > curbuf->b_ml.ml_line_count) {
curs = curbuf->b_ml.ml_line_count;
+ } else if (curs < 1) {
+ curs = 1;
+ }
for (i = start; i <= end; i++) {
if (minus && i == lnum) {
@@ -2895,8 +2901,11 @@ void ex_z(exarg_T *eap)
}
}
- curwin->w_cursor.lnum = curs;
- ex_no_reprint = TRUE;
+ if (curwin->w_cursor.lnum != curs) {
+ curwin->w_cursor.lnum = curs;
+ curwin->w_cursor.col = 0;
+ }
+ ex_no_reprint = true;
}
/*
diff --git a/src/nvim/ex_cmds.h b/src/nvim/ex_cmds.h
index 65bbd8a99e..b564cde56c 100644
--- a/src/nvim/ex_cmds.h
+++ b/src/nvim/ex_cmds.h
@@ -6,6 +6,8 @@
#include "nvim/os/time.h"
#include "nvim/pos.h"
#include "nvim/eval/typval.h"
+#include "nvim/buffer_defs.h"
+#include "nvim/ex_cmds_defs.h"
// flags for do_ecmd()
#define ECMD_HIDE 0x01 // don't free the current buffer
diff --git a/src/nvim/ex_cmds2.c b/src/nvim/ex_cmds2.c
index eeace789b2..a1a32d9f52 100644
--- a/src/nvim/ex_cmds2.c
+++ b/src/nvim/ex_cmds2.c
@@ -1,3 +1,6 @@
+// This is an open source non-commercial project. Dear PVS-Studio, please check
+// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
+
/// @file ex_cmds2.c
///
/// Some more functions for command line commands
diff --git a/src/nvim/ex_docmd.c b/src/nvim/ex_docmd.c
index 0fd4ae48be..7568d71ac0 100644
--- a/src/nvim/ex_docmd.c
+++ b/src/nvim/ex_docmd.c
@@ -1,3 +1,6 @@
+// This is an open source non-commercial project. Dear PVS-Studio, please check
+// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
+
/*
* ex_docmd.c: functions for executing an Ex command line.
*/
@@ -1304,7 +1307,6 @@ static char_u * do_one_cmd(char_u **cmdlinep,
/*
* 2. Handle command modifiers.
*/
- p = ea.cmd;
p = skip_range(ea.cmd, NULL);
switch (*p) {
/* When adding an entry, also modify cmd_exists(). */
@@ -1727,11 +1729,7 @@ static char_u * do_one_cmd(char_u **cmdlinep,
errormsg = (char_u *)_("E464: Ambiguous use of user-defined command");
goto doend;
}
- /* Check for wrong commands. */
- if (*p == '!' && ea.cmd[1] == 0151 && ea.cmd[0] == 78) {
- errormsg = uc_fun_cmd();
- goto doend;
- }
+ // Check for wrong commands.
if (ea.cmdidx == CMD_SIZE) {
if (!ea.skip) {
STRCPY(IObuff, _("E492: Not an editor command"));
@@ -4100,14 +4098,12 @@ int expand_filename(exarg_T *eap, char_u **cmdlinep, char_u **errormsgp)
xpc.xp_context = EXPAND_FILES;
if (p_wic)
options += WILD_ICASE;
- p = ExpandOne(&xpc, eap->arg, NULL,
- options, WILD_EXPAND_FREE);
- if (p == NULL)
+ p = ExpandOne(&xpc, eap->arg, NULL, options, WILD_EXPAND_FREE);
+ if (p == NULL) {
return FAIL;
- if (p != NULL) {
- (void)repl_cmdline(eap, eap->arg, STRLEN(eap->arg), p, cmdlinep);
- xfree(p);
}
+ (void)repl_cmdline(eap, eap->arg, STRLEN(eap->arg), p, cmdlinep);
+ xfree(p);
}
}
return OK;
@@ -4962,20 +4958,6 @@ static void uc_list(char_u *name, size_t name_len)
MSG(_("No user-defined commands found"));
}
-static char_u *uc_fun_cmd(void)
-{
- static char_u fcmd[] = {0x84, 0xaf, 0x60, 0xb9, 0xaf, 0xb5, 0x60, 0xa4,
- 0xa5, 0xad, 0xa1, 0xae, 0xa4, 0x60, 0xa1, 0x60,
- 0xb3, 0xa8, 0xb2, 0xb5, 0xa2, 0xa2, 0xa5, 0xb2,
- 0xb9, 0x7f, 0};
- int i;
-
- for (i = 0; fcmd[i]; ++i)
- IObuff[i] = fcmd[i] - 0x40;
- IObuff[i] = 0;
- return IObuff;
-}
-
static int uc_scan_attr(char_u *attr, size_t len, uint32_t *argt, long *def,
int *flags, int * compl, char_u **compl_arg,
int *addr_type_arg)
diff --git a/src/nvim/ex_eval.c b/src/nvim/ex_eval.c
index 65112c4dd8..5d664b94a8 100644
--- a/src/nvim/ex_eval.c
+++ b/src/nvim/ex_eval.c
@@ -1,3 +1,6 @@
+// This is an open source non-commercial project. Dear PVS-Studio, please check
+// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
+
// TODO(ZyX-I): move to eval/executor
/// @file ex_eval.c
diff --git a/src/nvim/ex_getln.c b/src/nvim/ex_getln.c
index 8810204c03..eed4bf6066 100644
--- a/src/nvim/ex_getln.c
+++ b/src/nvim/ex_getln.c
@@ -1,3 +1,6 @@
+// This is an open source non-commercial project. Dear PVS-Studio, please check
+// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
+
/*
* ex_getln.c: Functions for entering and editing an Ex command line.
*/
@@ -30,6 +33,7 @@
#include "nvim/if_cscope.h"
#include "nvim/indent.h"
#include "nvim/main.h"
+#include "nvim/mark.h"
#include "nvim/mbyte.h"
#include "nvim/memline.h"
#include "nvim/menu.h"
@@ -350,6 +354,7 @@ static int command_line_check(VimState *state)
quit_more = false; // reset after CTRL-D which had a more-prompt
cursorcmd(); // set the cursor on the right spot
+ ui_cursor_shape();
return 1;
}
@@ -1231,7 +1236,7 @@ static int command_line_handle_key(CommandLineState *s)
// command line has no uppercase characters, convert
// the character to lowercase
if (p_ic && p_scs && !pat_has_uppercase(ccline.cmdbuff)) {
- s->c = vim_tolower(s->c);
+ s->c = mb_tolower(s->c);
}
if (s->c != NUL) {
@@ -2091,6 +2096,18 @@ redraw:
return (char_u *)line_ga.ga_data;
}
+bool cmdline_overstrike(void)
+{
+ return ccline.overstrike;
+}
+
+
+/// Return true if the cursor is at the end of the cmdline.
+bool cmdline_at_end(void)
+{
+ return (ccline.cmdpos >= ccline.cmdlen);
+}
+
/*
* Allocate a new command line buffer.
* Assigns the new buffer to ccline.cmdbuff and ccline.cmdbufflen.
@@ -2261,6 +2278,7 @@ void putcmdline(int c, int shift)
draw_cmdline(ccline.cmdpos, ccline.cmdlen - ccline.cmdpos);
msg_no_more = FALSE;
cursorcmd();
+ ui_cursor_shape();
}
/*
@@ -2280,6 +2298,7 @@ void unputcmdline(void)
draw_cmdline(ccline.cmdpos, 1);
msg_no_more = FALSE;
cursorcmd();
+ ui_cursor_shape();
}
/*
@@ -2597,6 +2616,7 @@ void redrawcmdline(void)
compute_cmdrow();
redrawcmd();
cursorcmd();
+ ui_cursor_shape();
}
static void redrawcmdprompt(void)
@@ -3018,7 +3038,7 @@ ExpandOne (
|| xp->xp_context == EXPAND_FILES
|| xp->xp_context == EXPAND_SHELLCMD
|| xp->xp_context == EXPAND_BUFFERS)) {
- if (vim_tolower(c0) != vim_tolower(ci)) {
+ if (mb_tolower(c0) != mb_tolower(ci)) {
break;
}
} else if (c0 != ci) {
diff --git a/src/nvim/ex_getln.h b/src/nvim/ex_getln.h
index 5a1ca5213a..051564fbe1 100644
--- a/src/nvim/ex_getln.h
+++ b/src/nvim/ex_getln.h
@@ -3,6 +3,9 @@
#include "nvim/eval/typval.h"
#include "nvim/ex_cmds.h"
+#include "nvim/ex_cmds_defs.h"
+#include "nvim/os/time.h"
+#include "nvim/regexp_defs.h"
/* Values for nextwild() and ExpandOne(). See ExpandOne() for meaning. */
#define WILD_FREE 1
diff --git a/src/nvim/farsi.c b/src/nvim/farsi.c
index e7e93f756f..1053cb3ac2 100644
--- a/src/nvim/farsi.c
+++ b/src/nvim/farsi.c
@@ -1,3 +1,6 @@
+// This is an open source non-commercial project. Dear PVS-Studio, please check
+// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
+
/// @file farsi.c
///
/// Functions for Farsi language
@@ -321,7 +324,7 @@ static void put_curr_and_l_to_X(char_u c)
}
if ((curwin->w_cursor.col < (colnr_T)STRLEN(get_cursor_line_ptr()))) {
- if ((p_ri && curwin->w_cursor.col) || !p_ri) {
+ if (!p_ri || curwin->w_cursor.col) {
if (p_ri) {
dec_cursor();
} else {
diff --git a/src/nvim/file_search.c b/src/nvim/file_search.c
index 9592235905..8094a1b266 100644
--- a/src/nvim/file_search.c
+++ b/src/nvim/file_search.c
@@ -1,3 +1,6 @@
+// This is an open source non-commercial project. Dear PVS-Studio, please check
+// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
+
// File searching functions for 'path', 'tags' and 'cdpath' options.
//
// External visible functions:
@@ -1057,7 +1060,7 @@ static bool ff_wc_equal(char_u *s1, char_u *s2)
c1 = PTR2CHAR(s1 + i);
c2 = PTR2CHAR(s2 + j);
- if ((p_fic ? vim_tolower(c1) != vim_tolower(c2) : c1 != c2)
+ if ((p_fic ? mb_tolower(c1) != mb_tolower(c2) : c1 != c2)
&& (prev1 != '*' || prev2 != '*')) {
return false;
}
diff --git a/src/nvim/file_search.h b/src/nvim/file_search.h
index 833a1a05ff..b128029123 100644
--- a/src/nvim/file_search.h
+++ b/src/nvim/file_search.h
@@ -1,6 +1,11 @@
#ifndef NVIM_FILE_SEARCH_H
#define NVIM_FILE_SEARCH_H
+#include <stdlib.h> // for size_t
+
+#include "nvim/types.h" // for char_u
+#include "nvim/globals.h" // for CdScope
+
/* Flags for find_file_*() functions. */
#define FINDFILE_FILE 0 /* only files */
#define FINDFILE_DIR 1 /* only directories */
diff --git a/src/nvim/fileio.c b/src/nvim/fileio.c
index bd632b2755..3e062aecc0 100644
--- a/src/nvim/fileio.c
+++ b/src/nvim/fileio.c
@@ -1,3 +1,6 @@
+// This is an open source non-commercial project. Dear PVS-Studio, please check
+// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
+
/*
* fileio.c: read from and write to a file
*/
@@ -200,18 +203,14 @@ void filemess(buf_T *buf, char_u *name, char_u *s, int attr)
{
int msg_scroll_save;
- if (msg_silent != 0)
+ if (msg_silent != 0) {
return;
- msg_add_fname(buf, name); /* put file name in IObuff with quotes */
- /* If it's extremely long, truncate it. */
- if (STRLEN(IObuff) > IOSIZE - 80)
- IObuff[IOSIZE - 80] = NUL;
- STRCAT(IObuff, s);
- /*
- * For the first message may have to start a new line.
- * For further ones overwrite the previous one, reset msg_scroll before
- * calling filemess().
- */
+ }
+ add_quoted_fname((char *)IObuff, IOSIZE - 80, buf, (const char *)name);
+ xstrlcat((char *)IObuff, (const char *)s, IOSIZE);
+ // For the first message may have to start a new line.
+ // For further ones overwrite the previous one, reset msg_scroll before
+ // calling filemess().
msg_scroll_save = msg_scroll;
if (shortmess(SHM_OVERALL) && !exiting && p_verbose == 0)
msg_scroll = FALSE;
@@ -734,43 +733,16 @@ readfile (
fenc = (char_u *)""; /* binary: don't convert */
fenc_alloced = FALSE;
} else if (curbuf->b_help) {
- char_u firstline[80];
- int fc;
-
- /* Help files are either utf-8 or latin1. Try utf-8 first, if this
- * fails it must be latin1.
- * Always do this when 'encoding' is "utf-8". Otherwise only do
- * this when needed to avoid [converted] remarks all the time.
- * It is needed when the first line contains non-ASCII characters.
- * That is only in *.??x files. */
- fenc = (char_u *)"latin1";
- c = enc_utf8;
- if (!c && !read_stdin) {
- fc = fname[STRLEN(fname) - 1];
- if (TOLOWER_ASC(fc) == 'x') {
- /* Read the first line (and a bit more). Immediately rewind to
- * the start of the file. If the read() fails "len" is -1. */
- len = read_eintr(fd, firstline, 80);
- lseek(fd, (off_t)0L, SEEK_SET);
- for (p = firstline; p < firstline + len; ++p)
- if (*p >= 0x80) {
- c = TRUE;
- break;
- }
- }
- }
+ // Help files are either utf-8 or latin1. Try utf-8 first, if this
+ // fails it must be latin1.
+ // It is needed when the first line contains non-ASCII characters.
+ // That is only in *.??x files.
+ fenc_next = (char_u *)"latin1";
+ fenc = (char_u *)"utf-8";
- if (c) {
- fenc_next = fenc;
- fenc = (char_u *)"utf-8";
+ fenc_alloced = false;
- /* When the file is utf-8 but a character doesn't fit in
- * 'encoding' don't retry. In help text editing utf-8 bytes
- * doesn't make sense. */
- if (!enc_utf8)
- keep_dest_enc = TRUE;
- }
- fenc_alloced = FALSE;
+ c = 1;
} else if (*p_fencs == NUL) {
fenc = curbuf->b_p_fenc; /* use format from buffer */
fenc_alloced = FALSE;
@@ -1800,8 +1772,8 @@ failed:
}
if (!filtering && !(flags & READ_DUMMY)) {
- msg_add_fname(curbuf, sfname); /* fname in IObuff with quotes */
- c = FALSE;
+ add_quoted_fname((char *)IObuff, IOSIZE, curbuf, (const char *)sfname);
+ c = false;
#ifdef UNIX
# ifdef S_ISFIFO
@@ -2258,9 +2230,16 @@ buf_write (
int len;
linenr_T lnum;
long nchars;
- char_u *errmsg = NULL;
- int errmsg_allocated = FALSE;
- char_u *errnum = NULL;
+#define SET_ERRMSG_NUM(num, msg) \
+ errnum = num, errmsg = msg, errmsgarg = 0
+#define SET_ERRMSG_ARG(msg, error) \
+ errnum = NULL, errmsg = msg, errmsgarg = error
+#define SET_ERRMSG(msg) \
+ errnum = NULL, errmsg = msg, errmsgarg = 0
+ const char *errnum = NULL;
+ char *errmsg = NULL;
+ int errmsgarg = 0;
+ bool errmsg_allocated = false;
char_u *buffer;
char_u smallbuf[SMBUFSIZE];
char_u *backup_ext;
@@ -2282,7 +2261,6 @@ buf_write (
/* writing everything */
int whole = (start == 1 && end == buf->b_ml.ml_line_count);
linenr_T old_line_count = buf->b_ml.ml_line_count;
- int attr;
int fileformat;
int write_bin;
struct bw_info write_info; /* info for buf_write_bytes() */
@@ -2577,13 +2555,11 @@ buf_write (
perm = file_info_old.stat.st_mode;
if (!S_ISREG(file_info_old.stat.st_mode)) { /* not a file */
if (S_ISDIR(file_info_old.stat.st_mode)) {
- errnum = (char_u *)"E502: ";
- errmsg = (char_u *)_("is a directory");
+ SET_ERRMSG_NUM("E502", _("is a directory"));
goto fail;
}
if (os_nodetype((char *)fname) != NODE_WRITABLE) {
- errnum = (char_u *)"E503: ";
- errmsg = (char_u *)_("is not a file or writable device");
+ SET_ERRMSG_NUM("E503", _("is not a file or writable device"));
goto fail;
}
/* It's a device of some kind (or a fifo) which we can write to
@@ -2599,8 +2575,7 @@ buf_write (
*/
c = os_nodetype((char *)fname);
if (c == NODE_OTHER) {
- errnum = (char_u *)"E503: ";
- errmsg = (char_u *)_("is not a file or writable device");
+ SET_ERRMSG_NUM("E503", _("is not a file or writable device"));
goto fail;
}
if (c == NODE_WRITABLE) {
@@ -2612,8 +2587,7 @@ buf_write (
if (perm < 0) {
newfile = true;
} else if (os_isdir(fname)) {
- errnum = (char_u *)"E502: ";
- errmsg = (char_u *)_("is a directory");
+ SET_ERRMSG_NUM("E502", _("is a directory"));
goto fail;
}
if (overwriting) {
@@ -2632,11 +2606,9 @@ buf_write (
if (!forceit && file_readonly) {
if (vim_strchr(p_cpo, CPO_FWRITE) != NULL) {
- errnum = (char_u *)"E504: ";
- errmsg = (char_u *)_(err_readonly);
+ SET_ERRMSG_NUM("E504", _(err_readonly));
} else {
- errnum = (char_u *)"E505: ";
- errmsg = (char_u *)_("is read-only (add ! to override)");
+ SET_ERRMSG_NUM("E505", _("is read-only (add ! to override)"));
}
goto fail;
}
@@ -2904,23 +2876,27 @@ buf_write (
while ((write_info.bw_len = read_eintr(fd, copybuf,
BUFSIZE)) > 0) {
if (buf_write_bytes(&write_info) == FAIL) {
- errmsg = (char_u *)_(
- "E506: Can't write to backup file (add ! to override)");
+ SET_ERRMSG(_(
+ "E506: Can't write to backup file (add ! to override)"));
break;
}
os_breakcheck();
if (got_int) {
- errmsg = (char_u *)_(e_interr);
+ SET_ERRMSG(_(e_interr));
break;
}
}
- if (close(bfd) < 0 && errmsg == NULL)
- errmsg = (char_u *)_(
- "E507: Close error for backup file (add ! to override)");
- if (write_info.bw_len < 0)
- errmsg = (char_u *)_(
- "E508: Can't read file for backup (add ! to override)");
+ int error;
+ if ((error = os_close(bfd)) != 0 && errmsg == NULL) {
+ SET_ERRMSG_ARG(_("E507: Close error for backup file "
+ "(add ! to override): %s"),
+ error);
+ }
+ if (write_info.bw_len < 0) {
+ SET_ERRMSG(_(
+ "E508: Can't read file for backup (add ! to override)"));
+ }
#ifdef UNIX
set_file_time(backup,
file_info_old.stat.st_atim.tv_sec,
@@ -2937,18 +2913,19 @@ buf_write (
}
}
nobackup:
- close(fd); /* ignore errors for closing read file */
+ os_close(fd); // Ignore errors for closing read file.
xfree(copybuf);
- if (backup == NULL && errmsg == NULL)
- errmsg = (char_u *)_(
- "E509: Cannot create backup file (add ! to override)");
- /* ignore errors when forceit is TRUE */
+ if (backup == NULL && errmsg == NULL) {
+ SET_ERRMSG(_(
+ "E509: Cannot create backup file (add ! to override)"));
+ }
+ // Ignore errors when forceit is TRUE.
if ((some_error || errmsg != NULL) && !forceit) {
retval = FAIL;
goto fail;
}
- errmsg = NULL;
+ SET_ERRMSG(NULL);
} else {
char_u *dirp;
char_u *p;
@@ -2963,8 +2940,7 @@ nobackup:
* anyway, thus we need an extra check here.
*/
if (file_readonly && vim_strchr(p_cpo, CPO_FWRITE) != NULL) {
- errnum = (char_u *)"E504: ";
- errmsg = (char_u *)_(err_readonly);
+ SET_ERRMSG_NUM("E504", _(err_readonly));
goto fail;
}
@@ -3028,7 +3004,7 @@ nobackup:
}
}
if (backup == NULL && !forceit) {
- errmsg = (char_u *)_("E510: Can't make backup file (add ! to override)");
+ SET_ERRMSG(_("E510: Can't make backup file (add ! to override)"));
goto fail;
}
}
@@ -3069,7 +3045,7 @@ nobackup:
&& !(exiting && backup != NULL)) {
ml_preserve(buf, FALSE);
if (got_int) {
- errmsg = (char_u *)_(e_interr);
+ SET_ERRMSG(_(e_interr));
goto restore_backup;
}
}
@@ -3140,8 +3116,8 @@ nobackup:
*/
if (*p_ccv != NUL) {
wfname = vim_tempname();
- if (wfname == NULL) { /* Can't write without a tempfile! */
- errmsg = (char_u *)_("E214: Can't find temp file for writing");
+ if (wfname == NULL) { // Can't write without a tempfile!
+ SET_ERRMSG(_("E214: Can't find temp file for writing"));
goto restore_backup;
}
}
@@ -3153,8 +3129,8 @@ nobackup:
&& wfname == fname
) {
if (!forceit) {
- errmsg = (char_u *)_(
- "E213: Cannot convert (add ! to write without conversion)");
+ SET_ERRMSG(_(
+ "E213: Cannot convert (add ! to write without conversion)"));
goto restore_backup;
}
notconverted = TRUE;
@@ -3189,11 +3165,10 @@ nobackup:
if ((!newfile && os_fileinfo_hardlinks(&file_info) > 1)
|| (os_fileinfo_link((char *)fname, &file_info)
&& !os_fileinfo_id_equal(&file_info, &file_info_old))) {
- errmsg = (char_u *)_("E166: Can't open linked file for writing");
- } else
+ SET_ERRMSG(_("E166: Can't open linked file for writing"));
+ } else {
#endif
- {
- errmsg = (char_u *)_("E212: Can't open file for writing");
+ SET_ERRMSG_ARG(_("E212: Can't open file for writing: %s"), fd);
if (forceit && vim_strchr(p_cpo, CPO_FWRITE) == NULL
&& perm >= 0) {
#ifdef UNIX
@@ -3211,7 +3186,9 @@ nobackup:
os_remove((char *)wfname);
continue;
}
+#ifdef UNIX
}
+#endif
}
restore_backup:
@@ -3253,7 +3230,7 @@ restore_backup:
xfree(wfname);
goto fail;
}
- errmsg = NULL;
+ SET_ERRMSG(NULL);
write_info.bw_fd = fd;
@@ -3373,7 +3350,6 @@ restore_backup:
nchars += len;
}
-#if defined(UNIX)
// On many journalling file systems there is a bug that causes both the
// original and the backup file to be lost when halting the system right
// after writing the file. That's because only the meta-data is
@@ -3382,11 +3358,11 @@ restore_backup:
// For a device do try the fsync() but don't complain if it does not work
// (could be a pipe).
// If the 'fsync' option is FALSE, don't fsync(). Useful for laptops.
- if (p_fs && os_fsync(fd) != 0 && !device) {
- errmsg = (char_u *)_("E667: Fsync failed");
+ int error;
+ if (p_fs && (error = os_fsync(fd)) != 0 && !device) {
+ SET_ERRMSG_ARG(_("E667: Fsync failed: %s"), error);
end = 0;
}
-#endif
#ifdef HAVE_SELINUX
/* Probably need to set the security context. */
@@ -3416,8 +3392,8 @@ restore_backup:
}
#endif
- if (close(fd) != 0) {
- errmsg = (char_u *)_("E512: Close failed");
+ if ((error = os_close(fd)) != 0) {
+ SET_ERRMSG_ARG(_("E512: Close failed: %s"), error);
end = 0;
}
@@ -3454,21 +3430,24 @@ restore_backup:
if (end == 0) {
if (errmsg == NULL) {
if (write_info.bw_conv_error) {
- if (write_info.bw_conv_error_lnum == 0)
- errmsg = (char_u *)_(
- "E513: write error, conversion failed (make 'fenc' empty to override)");
- else {
- errmsg_allocated = TRUE;
- errmsg = xmalloc(300);
- vim_snprintf((char *)errmsg, 300,
- _("E513: write error, conversion failed in line %" PRId64
+ if (write_info.bw_conv_error_lnum == 0) {
+ SET_ERRMSG(_(
+ "E513: write error, conversion failed "
+ "(make 'fenc' empty to override)"));
+ } else {
+ errmsg_allocated = true;
+ SET_ERRMSG(xmalloc(300));
+ vim_snprintf(
+ errmsg, 300,
+ _("E513: write error, conversion failed in line %" PRIdLINENR
" (make 'fenc' empty to override)"),
- (int64_t)write_info.bw_conv_error_lnum);
+ write_info.bw_conv_error_lnum);
}
- } else if (got_int)
- errmsg = (char_u *)_(e_interr);
- else
- errmsg = (char_u *)_("E514: write error (file system full?)");
+ } else if (got_int) {
+ SET_ERRMSG(_(e_interr));
+ } else {
+ SET_ERRMSG(_("E514: write error (file system full?)"));
+ }
}
/*
@@ -3523,8 +3502,8 @@ restore_backup:
fname = sfname; /* use shortname now, for the messages */
#endif
if (!filtering) {
- msg_add_fname(buf, fname); /* put fname in IObuff with quotes */
- c = FALSE;
+ add_quoted_fname((char *)IObuff, IOSIZE, buf, (const char *)fname);
+ c = false;
if (write_info.bw_conv_error) {
STRCAT(IObuff, _(" CONVERSION ERROR"));
c = TRUE;
@@ -3673,33 +3652,32 @@ nofail:
#endif
if (errmsg != NULL) {
- int numlen = errnum != NULL ? (int)STRLEN(errnum) : 0;
-
- attr = hl_attr(HLF_E); /* set highlight for error messages */
- msg_add_fname(buf,
+ // - 100 to save some space for further error message
#ifndef UNIX
- sfname
+ add_quoted_fname((char *)IObuff, IOSIZE - 100, buf, (const char *)sfname);
#else
- fname
+ add_quoted_fname((char *)IObuff, IOSIZE - 100, buf, (const char *)fname);
#endif
- ); /* put file name in IObuff with quotes */
- if (STRLEN(IObuff) + STRLEN(errmsg) + numlen >= IOSIZE)
- IObuff[IOSIZE - STRLEN(errmsg) - numlen - 1] = NUL;
- /* If the error message has the form "is ...", put the error number in
- * front of the file name. */
if (errnum != NULL) {
- STRMOVE(IObuff + numlen, IObuff);
- memmove(IObuff, errnum, (size_t)numlen);
+ if (errmsgarg != 0) {
+ emsgf("%s: %s%s: %s", errnum, IObuff, errmsg, os_strerror(errmsgarg));
+ } else {
+ emsgf("%s: %s%s", errnum, IObuff, errmsg);
+ }
+ } else if (errmsgarg != 0) {
+ emsgf(errmsg, os_strerror(errmsgarg));
+ } else {
+ emsgf(errmsg);
}
- STRCAT(IObuff, errmsg);
- emsg(IObuff);
- if (errmsg_allocated)
+ if (errmsg_allocated) {
xfree(errmsg);
+ }
retval = FAIL;
if (end == 0) {
+ const int attr = hl_attr(HLF_E); // Set highlight for error messages.
MSG_PUTS_ATTR(_("\nWARNING: Original file may be lost or damaged\n"),
- attr | MSG_HIST);
+ attr | MSG_HIST);
MSG_PUTS_ATTR(_(
"don't quit the editor until the file is successfully written!"),
attr | MSG_HIST);
@@ -3759,6 +3737,9 @@ nofail:
got_int |= prev_got_int;
return retval;
+#undef SET_ERRMSG
+#undef SET_ERRMSG_ARG
+#undef SET_ERRMSG_NUM
}
/*
@@ -3802,16 +3783,25 @@ static int set_rw_fname(char_u *fname, char_u *sfname)
return OK;
}
-/*
- * Put file name into IObuff with quotes.
- */
-void msg_add_fname(buf_T *buf, char_u *fname)
+/// Put file name into the specified buffer with quotes
+///
+/// Replaces home directory at the start with `~`.
+///
+/// @param[out] ret_buf Buffer to save results to.
+/// @param[in] buf_len ret_buf length.
+/// @param[in] buf buf_T file name is coming from.
+/// @param[in] fname File name to write.
+static void add_quoted_fname(char *const ret_buf, const size_t buf_len,
+ const buf_T *const buf, const char *fname)
+ FUNC_ATTR_NONNULL_ARG(1)
{
- if (fname == NULL)
- fname = (char_u *)"-stdin-";
- home_replace(buf, fname, IObuff + 1, IOSIZE - 4, TRUE);
- IObuff[0] = '"';
- STRCAT(IObuff, "\" ");
+ if (fname == NULL) {
+ fname = "-stdin-";
+ }
+ ret_buf[0] = '"';
+ home_replace(buf, (const char_u *)fname, (char_u *)ret_buf + 1,
+ (int)buf_len - 4, true);
+ xstrlcat(ret_buf, "\" ", buf_len);
}
/// Append message for text mode to IObuff.
diff --git a/src/nvim/fold.c b/src/nvim/fold.c
index 36a5b0efd7..9c44e89eed 100644
--- a/src/nvim/fold.c
+++ b/src/nvim/fold.c
@@ -1,3 +1,6 @@
+// This is an open source non-commercial project. Dear PVS-Studio, please check
+// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
+
// vim: set fdm=marker fdl=1 fdc=3
/*
@@ -1689,12 +1692,10 @@ static void foldDelMarker(linenr_T lnum, char_u *marker, size_t markerlen)
}
}
-/* get_foldtext() {{{2 */
-/*
- * Return the text for a closed fold at line "lnum", with last line "lnume".
- * When 'foldtext' isn't set puts the result in "buf[51]". Otherwise the
- * result is in allocated memory.
- */
+// get_foldtext() {{{2
+/// Return the text for a closed fold at line "lnum", with last line "lnume".
+/// When 'foldtext' isn't set puts the result in "buf[FOLD_TEXT_LEN]".
+/// Otherwise the result is in allocated memory.
char_u *get_foldtext(win_T *wp, linenr_T lnum, linenr_T lnume,
foldinfo_T *foldinfo, char_u *buf)
FUNC_ATTR_NONNULL_ARG(1)
@@ -1781,8 +1782,12 @@ char_u *get_foldtext(win_T *wp, linenr_T lnum, linenr_T lnume,
}
}
if (text == NULL) {
- sprintf((char *)buf, _("+--%3ld lines folded "),
- (long)(lnume - lnum + 1));
+ unsigned long count = (unsigned long)(lnume - lnum + 1);
+
+ vim_snprintf((char *)buf, FOLD_TEXT_LEN,
+ ngettext("+--%3ld line folded",
+ "+--%3ld lines folded ", count),
+ count);
text = buf;
}
return text;
@@ -2232,32 +2237,51 @@ static linenr_T foldUpdateIEMSRecurse(garray_T *gap, int level,
* before where we started looking, extend it. If it
* starts at another line, update nested folds to keep
* their position, compensating for the new fd_top. */
- if (fp->fd_top >= startlnum && fp->fd_top != firstlnum) {
- if (fp->fd_top > firstlnum)
- /* like lines are inserted */
+ if (fp->fd_top == firstlnum) {
+ // We have found a fold beginning exactly where we want one.
+ } else if (fp->fd_top >= startlnum) {
+ if (fp->fd_top > firstlnum) {
+ // We will move the start of this fold up, hence we move all
+ // nested folds (with relative line numbers) down.
foldMarkAdjustRecurse(&fp->fd_nested,
- (linenr_T)0, (linenr_T)MAXLNUM,
- (long)(fp->fd_top - firstlnum), 0L);
- else
- /* like lines are deleted */
+ (linenr_T)0, (linenr_T)MAXLNUM,
+ (long)(fp->fd_top - firstlnum), 0L);
+ } else {
+ // Will move fold down, move nested folds relatively up.
foldMarkAdjustRecurse(&fp->fd_nested,
- (linenr_T)0,
- (long)(firstlnum - fp->fd_top - 1),
- (linenr_T)MAXLNUM,
- (long)(fp->fd_top - firstlnum));
+ (linenr_T)0,
+ (long)(firstlnum - fp->fd_top - 1),
+ (linenr_T)MAXLNUM,
+ (long)(fp->fd_top - firstlnum));
+ }
fp->fd_len += fp->fd_top - firstlnum;
fp->fd_top = firstlnum;
- fold_changed = TRUE;
- } else if (flp->start != 0 && lvl == level
- && fp->fd_top != firstlnum) {
- /* Existing fold that includes startlnum must stop
- * if we find the start of a new fold at the same
- * level. Split it. Delete contained folds at
- * this point to split them too. */
- foldRemove(&fp->fd_nested, flp->lnum - fp->fd_top,
- flp->lnum - fp->fd_top);
+ fold_changed = true;
+ } else if ((flp->start != 0 && lvl == level)
+ || (firstlnum != startlnum)) {
+ // Before there was a fold spanning from above startlnum to below
+ // firstlnum. This fold is valid above startlnum (because we are
+ // not updating that range), but there is now a break in it.
+ // If the break is because we are now forced to start a new fold
+ // at the level "level" at line fline->lnum, then we need to
+ // split the fold at fline->lnum.
+ // If the break is because the range [startlnum, firstlnum) is
+ // now at a lower indent than "level", we need to split the fold
+ // in this range.
+ // Any splits have to be done recursively.
+ linenr_T breakstart;
+ linenr_T breakend;
+ if (firstlnum != startlnum) {
+ breakstart = startlnum;
+ breakend = firstlnum;
+ } else {
+ breakstart = flp->lnum;
+ breakend = flp->lnum;
+ }
+ foldRemove(&fp->fd_nested, breakstart - fp->fd_top,
+ breakend - fp->fd_top);
i = (int)(fp - (fold_T *)gap->ga_data);
- foldSplit(gap, i, flp->lnum, flp->lnum - 1);
+ foldSplit(gap, i, breakstart, breakend - 1);
fp = (fold_T *)gap->ga_data + i + 1;
/* If using the "marker" or "syntax" method, we
* need to continue until the end of the fold is
@@ -2267,6 +2291,16 @@ static linenr_T foldUpdateIEMSRecurse(garray_T *gap, int level,
|| getlevel == foldlevelSyntax)
finish = TRUE;
}
+ if (fp->fd_top == startlnum && concat) {
+ i = (int)(fp - (fold_T *)gap->ga_data);
+ if (i != 0) {
+ fp2 = fp - 1;
+ if (fp2->fd_top + fp2->fd_len == fp->fd_top) {
+ foldMerge(fp2, gap, fp);
+ fp = fp2;
+ }
+ }
+ }
break;
}
if (fp->fd_top >= startlnum) {
@@ -2736,10 +2770,13 @@ void foldMoveRange(garray_T *gap, const linenr_T line1, const linenr_T line2,
}
dest_index = FOLD_INDEX(fp, gap);
- // All folds are now correct, but they are not necessarily in the correct
- // order.
- // We have to swap folds in the range [move_end, dest_index) with those in
- // the range [move_start, move_end).
+ // All folds are now correct, but not necessarily in the correct order.
+ // We must swap folds in the range [move_end, dest_index) with those in the
+ // range [move_start, move_end).
+ if (move_end == 0) {
+ // There are no folds after those moved, so none were moved out of order.
+ return;
+ }
reverse_fold_order(gap, move_start, dest_index - 1);
reverse_fold_order(gap, move_start, move_start + dest_index - move_end - 1);
reverse_fold_order(gap, move_start + dest_index - move_end, dest_index - 1);
diff --git a/src/nvim/fold.h b/src/nvim/fold.h
index 2ff10c0e91..f35b328fb1 100644
--- a/src/nvim/fold.h
+++ b/src/nvim/fold.h
@@ -1,7 +1,12 @@
#ifndef NVIM_FOLD_H
#define NVIM_FOLD_H
+#include <stdio.h>
+
#include "nvim/pos.h"
+#include "nvim/garray.h"
+#include "nvim/types.h"
+#include "nvim/buffer_defs.h"
/*
* Info used to pass info about a fold from the fold-detection code to the
diff --git a/src/nvim/garray.c b/src/nvim/garray.c
index 9ed3b901ef..2d2af54c95 100644
--- a/src/nvim/garray.c
+++ b/src/nvim/garray.c
@@ -1,3 +1,6 @@
+// This is an open source non-commercial project. Dear PVS-Studio, please check
+// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
+
/// @file garray.c
///
/// Functions for handling growing arrays.
diff --git a/src/nvim/getchar.c b/src/nvim/getchar.c
index 7143819e21..9d32df5a68 100644
--- a/src/nvim/getchar.c
+++ b/src/nvim/getchar.c
@@ -1,3 +1,6 @@
+// This is an open source non-commercial project. Dear PVS-Studio, please check
+// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
+
/*
* getchar.c
*
@@ -302,13 +305,13 @@ static void add_num_buff(buffheader_T *buf, long n)
*/
static void add_char_buff(buffheader_T *buf, int c)
{
- char bytes[MB_MAXBYTES + 1];
+ uint8_t bytes[MB_MAXBYTES + 1];
int len;
if (IS_SPECIAL(c)) {
len = 1;
} else {
- len = (*mb_char2bytes)(c, (char_u *)bytes);
+ len = mb_char2bytes(c, bytes);
}
for (int i = 0; i < len; i++) {
@@ -1849,11 +1852,12 @@ static int vgetorpeek(int advance)
mp_match = mp;
mp_match_len = keylen;
}
- } else
- /* No match; may have to check for
- * termcode at next character. */
- if (max_mlen < mlen)
- max_mlen = mlen;
+ } else {
+ // No match; may have to check for termcode at next character.
+ if (max_mlen < mlen) {
+ max_mlen = mlen;
+ }
+ }
}
}
@@ -1903,7 +1907,7 @@ static int vgetorpeek(int advance)
}
if ((mp == NULL || max_mlen >= mp_match_len)
- && keylen != KEYLEN_PART_MAP) {
+ && keylen != KEYLEN_PART_MAP && keylen != KEYLEN_PART_KEY) {
// No matching mapping found or found a non-matching mapping that
// matches at least what the matching mapping matched
keylen = 0;
diff --git a/src/nvim/getchar.h b/src/nvim/getchar.h
index bdf65909b6..28584e0534 100644
--- a/src/nvim/getchar.h
+++ b/src/nvim/getchar.h
@@ -1,6 +1,10 @@
#ifndef NVIM_GETCHAR_H
#define NVIM_GETCHAR_H
+#include "nvim/types.h"
+#include "nvim/buffer_defs.h"
+#include "nvim/ex_cmds_defs.h"
+
/* Values for "noremap" argument of ins_typebuf(). Also used for
* map->m_noremap and menu->noremap[]. */
#define REMAP_YES 0 /* allow remapping */
@@ -12,6 +16,7 @@
#define KEYLEN_PART_MAP -2 /* keylen value for incomplete mapping */
#define KEYLEN_REMOVED 9999 /* keylen value for removed sequence */
+
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "getchar.h.generated.h"
#endif
diff --git a/src/nvim/globals.h b/src/nvim/globals.h
index c15287aa38..df9f418951 100644
--- a/src/nvim/globals.h
+++ b/src/nvim/globals.h
@@ -464,6 +464,7 @@ typedef enum {
, HLF_CUL // 'cursurline'
, HLF_MC // 'colorcolumn'
, HLF_QFL // selected quickfix line
+ , HLF_0 // Whitespace
, HLF_COUNT // MUST be the last one
} hlf_T;
@@ -472,7 +473,7 @@ typedef enum {
#define HL_FLAGS { '8', '~', 'z', 'Z', '@', 'd', 'e', 'i', 'l', 'm', 'M', 'n', \
'N', 'r', 's', 'S', 'c', 't', 'v', 'V', 'w', 'W', 'f', 'F', \
'A', 'C', 'D', 'T', '-', '>', 'B', 'P', 'R', 'L', '+', '=', \
- 'x', 'X', '*', '#', '_', '!', '.', 'o', 'q' }
+ 'x', 'X', '*', '#', '_', '!', '.', 'o', 'q', '0' }
EXTERN int highlight_attr[HLF_COUNT]; /* Highl. attr for each context. */
EXTERN int highlight_user[9]; /* User[1-9] attributes */
@@ -547,6 +548,7 @@ EXTERN win_T *prevwin INIT(= NULL); /* previous window */
FOR_ALL_TABS(tp) \
FOR_ALL_WINDOWS_IN_TAB(wp, tp)
+// -V:FOR_ALL_WINDOWS_IN_TAB:501
# define FOR_ALL_WINDOWS_IN_TAB(wp, tp) \
for (win_T *wp = ((tp) == curtab) \
? firstwin : (tp)->tp_firstwin; wp != NULL; wp = wp->w_next)
diff --git a/src/nvim/hardcopy.c b/src/nvim/hardcopy.c
index 4cb05ffc12..abc4773d84 100644
--- a/src/nvim/hardcopy.c
+++ b/src/nvim/hardcopy.c
@@ -1,3 +1,6 @@
+// This is an open source non-commercial project. Dear PVS-Studio, please check
+// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
+
/*
* hardcopy.c: printing to paper
*/
@@ -2576,13 +2579,12 @@ int mch_print_begin(prt_settings_T *psettings)
prt_conv.vc_type = CONV_NONE;
if (!(enc_canon_props(p_enc) & enc_canon_props(p_encoding) & ENC_8BIT)) {
- /* Set up encoding conversion if required */
- if (FAIL == convert_setup(&prt_conv, p_enc, p_encoding)) {
- EMSG2(_("E620: Unable to convert to print encoding \"%s\""),
- p_encoding);
- return FALSE;
+ // Set up encoding conversion if required
+ if (convert_setup(&prt_conv, p_enc, p_encoding) == FAIL) {
+ emsgf(_("E620: Unable to convert to print encoding \"%s\""),
+ p_encoding);
+ return false;
}
- prt_do_conv = TRUE;
}
prt_do_conv = prt_conv.vc_type != CONV_NONE;
diff --git a/src/nvim/hardcopy.h b/src/nvim/hardcopy.h
index 4ead8dd5d4..a70b20e6f5 100644
--- a/src/nvim/hardcopy.h
+++ b/src/nvim/hardcopy.h
@@ -2,6 +2,10 @@
#define NVIM_HARDCOPY_H
#include <stdint.h>
+#include <stdlib.h> // for size_t
+
+#include "nvim/types.h" // for char_u
+#include "nvim/ex_cmds_defs.h" // for exarg_T
/*
* Structure to hold printing color and font attributes.
diff --git a/src/nvim/hashtab.c b/src/nvim/hashtab.c
index 354c9718ba..3397788b00 100644
--- a/src/nvim/hashtab.c
+++ b/src/nvim/hashtab.c
@@ -1,3 +1,6 @@
+// This is an open source non-commercial project. Dear PVS-Studio, please check
+// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
+
/// @file hashtab.c
///
/// Handling of a hashtable with Vim-specific properties.
diff --git a/src/nvim/iconv.h b/src/nvim/iconv.h
index bf29b15247..d7234090c4 100644
--- a/src/nvim/iconv.h
+++ b/src/nvim/iconv.h
@@ -10,9 +10,7 @@
// USE_ICONV, or to put the USE_ICONV definition in config.h.in directly. As
// it stands, globals.h needs to be included alongside iconv.h.
-#ifdef HAVE_CONFIG_H
-# include "auto/config.h"
-#endif
+#include "auto/config.h"
// Use iconv() when it's available, either by linking to the library at
// compile time or by loading it at runtime.
diff --git a/src/nvim/if_cscope.c b/src/nvim/if_cscope.c
index b647b8146a..e1c7df9175 100644
--- a/src/nvim/if_cscope.c
+++ b/src/nvim/if_cscope.c
@@ -1,3 +1,6 @@
+// This is an open source non-commercial project. Dear PVS-Studio, please check
+// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
+
/*
* CSCOPE support for Vim added by Andy Kahn <kahn@zk3.dec.com>
* Ported to Win32 by Sergey Khorev <sergey.khorev@gmail.com>
diff --git a/src/nvim/if_cscope.h b/src/nvim/if_cscope.h
index 351d9caef6..e20462576a 100644
--- a/src/nvim/if_cscope.h
+++ b/src/nvim/if_cscope.h
@@ -1,6 +1,9 @@
#ifndef NVIM_IF_CSCOPE_H
#define NVIM_IF_CSCOPE_H
+#include "nvim/types.h" // for char_u and expand_T
+#include "nvim/ex_cmds_defs.h" // for exarg_T
+
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "if_cscope.h.generated.h"
#endif
diff --git a/src/nvim/indent.c b/src/nvim/indent.c
index 7f31bb8c5c..5471b41b2c 100644
--- a/src/nvim/indent.c
+++ b/src/nvim/indent.c
@@ -1,3 +1,6 @@
+// This is an open source non-commercial project. Dear PVS-Studio, please check
+// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
+
#include <assert.h>
#include <inttypes.h>
#include <stdbool.h>
@@ -7,6 +10,7 @@
#include "nvim/eval.h"
#include "nvim/charset.h"
#include "nvim/cursor.h"
+#include "nvim/mark.h"
#include "nvim/memline.h"
#include "nvim/memory.h"
#include "nvim/misc1.h"
@@ -598,7 +602,7 @@ int get_lisp_indent(void)
paren = *pos;
pos = findmatch(NULL, '[');
- if ((pos == NULL) || ltp(pos, &paren)) {
+ if ((pos == NULL) || lt(*pos, paren)) {
pos = &paren;
}
}
diff --git a/src/nvim/indent_c.c b/src/nvim/indent_c.c
index 4a73fbaf61..4806f46705 100644
--- a/src/nvim/indent_c.c
+++ b/src/nvim/indent_c.c
@@ -1,3 +1,6 @@
+// This is an open source non-commercial project. Dear PVS-Studio, please check
+// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
+
#include <assert.h>
#include <inttypes.h>
#include <stdint.h>
@@ -10,6 +13,7 @@
#include "nvim/edit.h"
#include "nvim/indent.h"
#include "nvim/indent_c.h"
+#include "nvim/mark.h"
#include "nvim/memline.h"
#include "nvim/memory.h"
#include "nvim/option.h"
diff --git a/src/nvim/keymap.c b/src/nvim/keymap.c
index 72b0d0aa40..9c5fe78c7c 100644
--- a/src/nvim/keymap.c
+++ b/src/nvim/keymap.c
@@ -1,3 +1,6 @@
+// This is an open source non-commercial project. Dear PVS-Studio, please check
+// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
+
#include <assert.h>
#include <inttypes.h>
#include <limits.h>
@@ -490,17 +493,19 @@ char_u *get_special_key_name(int c, int modifiers)
/// @param[out] dst Location where translation result will be kept. Must have
/// at least six bytes.
/// @param[in] keycode Prefer key code, e.g. K_DEL in place of DEL.
+/// @param[in] in_string Inside a double quoted string
///
/// @return Number of characters added to dst, zero for no match.
unsigned int trans_special(const char_u **srcp, const size_t src_len,
- char_u *const dst, const bool keycode)
+ char_u *const dst, const bool keycode,
+ const bool in_string)
FUNC_ATTR_NONNULL_ALL FUNC_ATTR_WARN_UNUSED_RESULT
{
int modifiers = 0;
int key;
unsigned int dlen = 0;
- key = find_special_key(srcp, src_len, &modifiers, keycode, false);
+ key = find_special_key(srcp, src_len, &modifiers, keycode, false, in_string);
if (key == 0) {
return 0;
}
@@ -536,10 +541,12 @@ unsigned int trans_special(const char_u **srcp, const size_t src_len,
/// @param[out] modp Location where information about modifiers is saved.
/// @param[in] keycode Prefer key code, e.g. K_DEL in place of DEL.
/// @param[in] keep_x_key Don’t translate xHome to Home key.
+/// @param[in] in_string In string, double quote is escaped
///
/// @return Key and modifiers or 0 if there is no match.
int find_special_key(const char_u **srcp, const size_t src_len, int *const modp,
- const bool keycode, const bool keep_x_key)
+ const bool keycode, const bool keep_x_key,
+ const bool in_string)
FUNC_ATTR_WARN_UNUSED_RESULT FUNC_ATTR_NONNULL_ALL
{
const char_u *last_dash;
@@ -573,10 +580,14 @@ int find_special_key(const char_u **srcp, const size_t src_len, int *const modp,
} else {
l = 1;
}
- if (end - bp > l && bp[l] != '"' && bp[l + 1] == '>') {
- // Anything accepted, like <C-?>, except <C-">, because the "
- // ends the string.
+ // Anything accepted, like <C-?>.
+ // <C-"> or <M-"> are not special in strings as " is
+ // the string delimiter. With a backslash it works: <M-\">
+ if (end - bp > l && !(in_string && bp[1] == '"') && bp[2] == '>') {
bp += l;
+ } else if (end - bp > 2 && in_string && bp[1] == '\\'
+ && bp[2] == '"' && bp[3] == '>') {
+ bp += 2;
}
}
}
@@ -612,18 +623,17 @@ int find_special_key(const char_u **srcp, const size_t src_len, int *const modp,
vim_str2nr(last_dash + 6, NULL, NULL, STR2NR_ALL, NULL, &n, 0);
key = (int)n;
} else {
- /*
- * Modifier with single letter, or special key name.
- */
- if (has_mbyte) {
- l = mb_ptr2len(last_dash + 1);
- } else {
- l = 1;
+ int off = 1;
+
+ // Modifier with single letter, or special key name.
+ if (in_string && last_dash[1] == '\\' && last_dash[2] == '"') {
+ off = 2;
}
+ l = mb_ptr2len(last_dash + 1);
if (modifiers != 0 && last_dash[l + 1] == '>') {
- key = PTR2CHAR(last_dash + 1);
+ key = PTR2CHAR(last_dash + off);
} else {
- key = get_special_key_code(last_dash + 1);
+ key = get_special_key_code(last_dash + off);
if (!keep_x_key) {
key = handle_x_keys(key);
}
@@ -828,7 +838,8 @@ char_u *replace_termcodes(const char_u *from, const size_t from_len,
}
}
- slen = trans_special(&src, (size_t) (end - src) + 1, result + dlen, true);
+ slen = trans_special(&src, (size_t)(end - src) + 1, result + dlen, true,
+ true);
if (slen) {
dlen += slen;
continue;
diff --git a/src/nvim/log.c b/src/nvim/log.c
index bbb4dfb944..d059e28d5d 100644
--- a/src/nvim/log.c
+++ b/src/nvim/log.c
@@ -1,3 +1,6 @@
+// This is an open source non-commercial project. Dear PVS-Studio, please check
+// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
+
#include <assert.h>
#include <inttypes.h>
#include <stdarg.h>
diff --git a/src/nvim/macros.h b/src/nvim/macros.h
index 5042663041..214af82422 100644
--- a/src/nvim/macros.h
+++ b/src/nvim/macros.h
@@ -29,25 +29,6 @@
#define S_LEN(s) (s), (sizeof(s) - 1)
/*
- * Position comparisons
- */
-# define lt(a, b) (((a).lnum != (b).lnum) \
- ? (a).lnum < (b).lnum \
- : (a).col != (b).col \
- ? (a).col < (b).col \
- : (a).coladd < (b).coladd)
-# define ltp(a, b) (((a)->lnum != (b)->lnum) \
- ? (a)->lnum < (b)->lnum \
- : (a)->col != (b)->col \
- ? (a)->col < (b)->col \
- : (a)->coladd < (b)->coladd)
-# define equalpos(a, b) (((a).lnum == (b).lnum) && ((a).col == (b).col) && \
- ((a).coladd == (b).coladd))
-# define clearpos(a) {(a)->lnum = 0; (a)->col = 0; (a)->coladd = 0; }
-
-#define ltoreq(a, b) (lt(a, b) || equalpos(a, b))
-
-/*
* lineempty() - return TRUE if the line is empty
*/
#define lineempty(p) (*ml_get(p) == NUL)
@@ -62,7 +43,7 @@
* toupper() and tolower() that use the current locale.
* Careful: Only call TOUPPER_LOC() and TOLOWER_LOC() with a character in the
* range 0 - 255. toupper()/tolower() on some systems can't handle others.
- * Note: It is often better to use vim_tolower() and vim_toupper(), because many
+ * Note: It is often better to use mb_tolower() and mb_toupper(), because many
* toupper() and tolower() implementations only work for ASCII.
*/
#define TOUPPER_LOC toupper
@@ -94,7 +75,7 @@
do { \
if (*p_langmap \
&& (condition) \
- && (!p_lnr || (p_lnr && typebuf_maplen() == 0)) \
+ && (p_lrm || KeyTyped) \
&& !KeyStuffed \
&& (c) >= 0) \
{ \
@@ -120,8 +101,10 @@
/* mch_open_rw(): invoke os_open() with third argument for user R/W. */
#if defined(UNIX) /* open in rw------- mode */
# define mch_open_rw(n, f) os_open((n), (f), (mode_t)0600)
+#elif defined(WIN32)
+# define mch_open_rw(n, f) os_open((n), (f), S_IREAD | S_IWRITE)
#else
-# define mch_open_rw(n, f) os_open((n), (f), 0)
+# define mch_open_rw(n, f) os_open((n), (f), 0)
#endif
# define REPLACE_NORMAL(s) (((s) & REPLACE_FLAG) && !((s) & VREPLACE_FLAG))
diff --git a/src/nvim/main.c b/src/nvim/main.c
index 33e1551351..1095d4d3b5 100644
--- a/src/nvim/main.c
+++ b/src/nvim/main.c
@@ -1,3 +1,6 @@
+// This is an open source non-commercial project. Dear PVS-Studio, please check
+// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
+
#define EXTERN
#include <assert.h>
#include <stdint.h>
@@ -283,7 +286,7 @@ int main(int argc, char **argv)
cmdline_row = (int)(Rows - p_ch);
msg_row = cmdline_row;
screenalloc(false); /* allocate screen buffers */
- set_init_2();
+ set_init_2(params.headless);
TIME_MSG("inits 2");
msg_scroll = TRUE;
diff --git a/src/nvim/map.c b/src/nvim/map.c
index 73af487f90..366b286d14 100644
--- a/src/nvim/map.c
+++ b/src/nvim/map.c
@@ -1,3 +1,6 @@
+// This is an open source non-commercial project. Dear PVS-Studio, please check
+// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
+
#include <stdlib.h>
#include <stdbool.h>
#include <string.h>
@@ -139,7 +142,6 @@ static inline bool String_eq(String a, String b)
MAP_IMPL(int, int, DEFAULT_INITIALIZER)
-MAP_IMPL(cstr_t, uint64_t, DEFAULT_INITIALIZER)
MAP_IMPL(cstr_t, ptr_t, DEFAULT_INITIALIZER)
MAP_IMPL(ptr_t, ptr_t, DEFAULT_INITIALIZER)
MAP_IMPL(uint64_t, ptr_t, DEFAULT_INITIALIZER)
diff --git a/src/nvim/map.h b/src/nvim/map.h
index ba3e84cb31..a4fccf47f9 100644
--- a/src/nvim/map.h
+++ b/src/nvim/map.h
@@ -25,7 +25,6 @@
void map_##T##_##U##_clear(Map(T, U) *map);
MAP_DECLS(int, int)
-MAP_DECLS(cstr_t, uint64_t)
MAP_DECLS(cstr_t, ptr_t)
MAP_DECLS(ptr_t, ptr_t)
MAP_DECLS(uint64_t, ptr_t)
diff --git a/src/nvim/mark.c b/src/nvim/mark.c
index ae94ec7ecd..675fe4d57f 100644
--- a/src/nvim/mark.c
+++ b/src/nvim/mark.c
@@ -1,3 +1,6 @@
+// This is an open source non-commercial project. Dear PVS-Studio, please check
+// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
+
/*
* mark.c: functions for setting marks and jumping to them
*/
diff --git a/src/nvim/mark.h b/src/nvim/mark.h
index efba9708db..a356c1f398 100644
--- a/src/nvim/mark.h
+++ b/src/nvim/mark.h
@@ -4,10 +4,12 @@
#include "nvim/macros.h"
#include "nvim/ascii.h"
#include "nvim/buffer_defs.h"
+#include "nvim/func_attr.h"
#include "nvim/mark_defs.h"
#include "nvim/memory.h"
#include "nvim/pos.h"
#include "nvim/os/time.h"
+#include "nvim/ex_cmds_defs.h" // for exarg_T
/// Set fmark using given value
#define SET_FMARK(fmarkp_, mark_, fnum_) \
@@ -74,6 +76,45 @@ static inline int mark_local_index(const char name)
: -1))));
}
+static inline bool lt(pos_T, pos_T) REAL_FATTR_CONST REAL_FATTR_ALWAYS_INLINE;
+static inline bool equalpos(pos_T, pos_T)
+ REAL_FATTR_CONST REAL_FATTR_ALWAYS_INLINE;
+static inline bool ltoreq(pos_T, pos_T)
+ REAL_FATTR_CONST REAL_FATTR_ALWAYS_INLINE;
+static inline void clearpos(pos_T *) REAL_FATTR_ALWAYS_INLINE;
+
+/// Return true if position a is before (less than) position b.
+static inline bool lt(pos_T a, pos_T b)
+{
+ if (a.lnum != b.lnum) {
+ return a.lnum < b.lnum;
+ } else if (a.col != b.col) {
+ return a.col < b.col;
+ } else {
+ return a.coladd < b.coladd;
+ }
+}
+
+/// Return true if position a and b are equal.
+static inline bool equalpos(pos_T a, pos_T b)
+{
+ return (a.lnum == b.lnum) && (a.col == b.col) && (a.coladd == b.coladd);
+}
+
+/// Return true if position a is less than or equal to b.
+static inline bool ltoreq(pos_T a, pos_T b)
+{
+ return lt(a, b) || equalpos(a, b);
+}
+
+/// Clear the pos_T structure pointed to by a.
+static inline void clearpos(pos_T *a)
+{
+ a->lnum = 0;
+ a->col = 0;
+ a->coladd = 0;
+}
+
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "mark.h.generated.h"
#endif
diff --git a/src/nvim/mbyte.c b/src/nvim/mbyte.c
index d96848754c..b21ec944c1 100644
--- a/src/nvim/mbyte.c
+++ b/src/nvim/mbyte.c
@@ -1,3 +1,6 @@
+// This is an open source non-commercial project. Dear PVS-Studio, please check
+// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
+
/// mbyte.c: Code specifically for handling multi-byte characters.
/// Multibyte extensions partly by Sung-Hoon Baek
///
@@ -1174,11 +1177,14 @@ int utf_fold(int a)
return utf_convert(a, foldCase, ARRAY_SIZE(foldCase));
}
-/*
- * Return the upper-case equivalent of "a", which is a UCS-4 character. Use
- * simple case folding.
- */
-int utf_toupper(int a)
+// Vim's own character class functions. These exist because many library
+// islower()/toupper() etc. do not work properly: they crash when used with
+// invalid values or can't handle latin1 when the locale is C.
+// Speed is most important here.
+
+/// Return the upper-case equivalent of "a", which is a UCS-4 character. Use
+/// simple case folding.
+int mb_toupper(int a)
{
/* If 'casemap' contains "keepascii" use ASCII style toupper(). */
if (a < 128 && (cmp_flags & CMP_KEEPASCII))
@@ -1198,17 +1204,15 @@ int utf_toupper(int a)
return utf_convert(a, toUpper, ARRAY_SIZE(toUpper));
}
-bool utf_islower(int a)
+bool mb_islower(int a)
{
- /* German sharp s is lower case but has no upper case equivalent. */
- return (utf_toupper(a) != a) || a == 0xdf;
+ // German sharp s is lower case but has no upper case equivalent.
+ return (mb_toupper(a) != a) || a == 0xdf;
}
-/*
- * Return the lower-case equivalent of "a", which is a UCS-4 character. Use
- * simple case folding.
- */
-int utf_tolower(int a)
+/// Return the lower-case equivalent of "a", which is a UCS-4 character. Use
+/// simple case folding.
+int mb_tolower(int a)
{
/* If 'casemap' contains "keepascii" use ASCII style tolower(). */
if (a < 128 && (cmp_flags & CMP_KEEPASCII))
@@ -1228,9 +1232,9 @@ int utf_tolower(int a)
return utf_convert(a, toLower, ARRAY_SIZE(toLower));
}
-bool utf_isupper(int a)
+bool mb_isupper(int a)
{
- return utf_tolower(a) != a;
+ return mb_tolower(a) != a;
}
static int utf_strnicmp(const char_u *s1, const char_u *s2, size_t n1,
@@ -1304,6 +1308,7 @@ static int utf_strnicmp(const char_u *s1, const char_u *s2, size_t n1,
# define CP_UTF8 65001 /* magic number from winnls.h */
#endif
+/// Reassigns `strw` to a new, allocated pointer to a UTF16 string.
int utf8_to_utf16(const char *str, WCHAR **strw)
FUNC_ATTR_NONNULL_ALL
{
@@ -1345,40 +1350,40 @@ int utf8_to_utf16(const char *str, WCHAR **strw)
return 0;
}
+/// Reassigns `str` to a new, allocated pointer to a UTF8 string.
int utf16_to_utf8(const WCHAR *strw, char **str)
FUNC_ATTR_NONNULL_ALL
{
// Compute the space required to store the string as UTF-8.
- ssize_t utf8_len = WideCharToMultiByte(CP_UTF8,
- 0,
- strw,
- -1,
- NULL,
- 0,
- NULL,
- NULL);
+ DWORD utf8_len = WideCharToMultiByte(CP_UTF8,
+ 0,
+ strw,
+ -1,
+ NULL,
+ 0,
+ NULL,
+ NULL);
if (utf8_len == 0) {
return GetLastError();
}
- ssize_t buf_sz = utf8_len * sizeof(char);
- char *buf = xmalloc(buf_sz);
- char *pos = buf;
+ *str = xmalloc(utf8_len);
- // Convert string to UTF-8.
- int r = WideCharToMultiByte(CP_UTF8,
- 0,
- strw,
- -1,
- pos,
- utf8_len,
- NULL,
- NULL);
- assert(r == utf8_len);
- if (r != utf8_len) {
- EMSG2("WideCharToMultiByte failed: %d", r);
- }
- *str = pos;
+ // Convert to UTF-8.
+ utf8_len = WideCharToMultiByte(CP_UTF8,
+ 0,
+ strw,
+ -1,
+ *str,
+ utf8_len,
+ NULL,
+ NULL);
+ if (utf8_len == 0) {
+ free(*str);
+ *str = NULL;
+ return GetLastError();
+ }
+ (*str)[utf8_len] = '\0';
return 0;
}
diff --git a/src/nvim/mbyte.h b/src/nvim/mbyte.h
index 3565202466..ad9e38004c 100644
--- a/src/nvim/mbyte.h
+++ b/src/nvim/mbyte.h
@@ -7,6 +7,7 @@
#include "nvim/iconv.h"
#include "nvim/func_attr.h"
#include "nvim/os/os_defs.h" // For WCHAR, indirect
+#include "nvim/types.h" // for char_u
/*
* Return byte length of character that starts with byte "b".
diff --git a/src/nvim/memfile.c b/src/nvim/memfile.c
index 5d6639c4d0..efaf1f94c5 100644
--- a/src/nvim/memfile.c
+++ b/src/nvim/memfile.c
@@ -1,3 +1,6 @@
+// This is an open source non-commercial project. Dear PVS-Studio, please check
+// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
+
/// An abstraction to handle blocks of memory which can be stored in a file.
/// This is the implementation of a sort of virtual memory.
///
diff --git a/src/nvim/memfile_defs.h b/src/nvim/memfile_defs.h
index cc71e1a7ff..b3c2f3564c 100644
--- a/src/nvim/memfile_defs.h
+++ b/src/nvim/memfile_defs.h
@@ -3,8 +3,10 @@
#include <stdint.h>
#include <stdbool.h>
+#include <stdlib.h>
#include "nvim/types.h"
+#include "nvim/pos.h"
/// A block number.
///
diff --git a/src/nvim/memline.c b/src/nvim/memline.c
index 5ea2397db3..40a6761225 100644
--- a/src/nvim/memline.c
+++ b/src/nvim/memline.c
@@ -1,3 +1,6 @@
+// This is an open source non-commercial project. Dear PVS-Studio, please check
+// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
+
/* for debugging */
/* #define CHECK(c, s) if (c) EMSG(s) */
#define CHECK(c, s)
@@ -616,7 +619,7 @@ static bool ml_check_b0_strings(ZERO_BL *b0p)
return (memchr(b0p->b0_version, NUL, 10)
&& memchr(b0p->b0_uname, NUL, B0_UNAME_SIZE)
&& memchr(b0p->b0_hname, NUL, B0_HNAME_SIZE)
- && memchr(b0p->b0_fname, NUL, B0_FNAME_SIZE_CRYPT));
+ && memchr(b0p->b0_fname, NUL, B0_FNAME_SIZE_CRYPT)); // -V512
}
/*
@@ -3362,29 +3365,32 @@ static char *findswapname(buf_T *buf, char **dirp, char *old_fname,
}
if (swap_exists_action != SEA_NONE && choice == 0) {
- char *name;
+ const char *const sw_msg_1 = _("Swap file \"");
+ const char *const sw_msg_2 = _("\" already exists!");
const size_t fname_len = strlen(fname);
- name = xmalloc(fname_len
- + strlen(_("Swap file \""))
- + strlen(_("\" already exists!")) + 5);
- STRCPY(name, _("Swap file \""));
- home_replace(NULL, (char_u *) fname, (char_u *)&name[strlen(name)],
- fname_len, true);
- STRCAT(name, _("\" already exists!"));
- choice = do_dialog(VIM_WARNING,
- (char_u *)_("VIM - ATTENTION"),
- (char_u *)(name == NULL
- ? _("Swap file already exists!")
- : name),
+ const size_t sw_msg_1_len = strlen(sw_msg_1);
+ const size_t sw_msg_2_len = strlen(sw_msg_2);
+
+ const size_t name_len = sw_msg_1_len + fname_len + sw_msg_2_len + 5;
+
+ char *const name = xmalloc(name_len);
+ memcpy(name, sw_msg_1, sw_msg_1_len + 1);
+ home_replace(NULL, (char_u *)fname, (char_u *)&name[sw_msg_1_len],
+ fname_len, true);
+ xstrlcat(name, sw_msg_2, name_len);
+ choice = do_dialog(VIM_WARNING, (char_u *)_("VIM - ATTENTION"),
+ (char_u *)name,
# if defined(UNIX)
- process_still_running
- ? (char_u *)_(
- "&Open Read-Only\n&Edit anyway\n&Recover\n&Quit\n&Abort") :
+ process_still_running
+ ? (char_u *)_(
+ "&Open Read-Only\n&Edit anyway\n&Recover"
+ "\n&Quit\n&Abort") :
# endif
- (char_u *)_(
- "&Open Read-Only\n&Edit anyway\n&Recover\n&Delete it\n&Quit\n&Abort"),
- 1, NULL, FALSE);
+ (char_u *)_(
+ "&Open Read-Only\n&Edit anyway\n&Recover"
+ "\n&Delete it\n&Quit\n&Abort"),
+ 1, NULL, false);
# if defined(UNIX)
if (process_still_running && choice >= 4)
diff --git a/src/nvim/memline.h b/src/nvim/memline.h
index f84e86fea0..a239c6a031 100644
--- a/src/nvim/memline.h
+++ b/src/nvim/memline.h
@@ -2,6 +2,8 @@
#define NVIM_MEMLINE_H
#include "nvim/types.h"
+#include "nvim/pos.h" // for pos_T, linenr_T, colnr_T
+#include "nvim/buffer_defs.h" // for buf_T
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "memline.h.generated.h"
diff --git a/src/nvim/memory.c b/src/nvim/memory.c
index b4fdd86a6d..0ee4776581 100644
--- a/src/nvim/memory.c
+++ b/src/nvim/memory.c
@@ -1,3 +1,6 @@
+// This is an open source non-commercial project. Dear PVS-Studio, please check
+// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
+
// Various routines dealing with allocation and deallocation of memory.
#include <assert.h>
@@ -495,6 +498,13 @@ bool strequal(const char *a, const char *b)
return (a == NULL && b == NULL) || (a && b && strcmp(a, b) == 0);
}
+/// Case-insensitive `strequal`.
+bool striequal(const char *a, const char *b)
+ FUNC_ATTR_PURE FUNC_ATTR_WARN_UNUSED_RESULT
+{
+ return (a == NULL && b == NULL) || (a && b && STRICMP(a, b) == 0);
+}
+
/*
* Avoid repeating the error message many times (they take 1 second each).
* Did_outofmem_msg is reset when a character is read.
diff --git a/src/nvim/menu.c b/src/nvim/menu.c
index 529978e3f0..4e621b49c1 100644
--- a/src/nvim/menu.c
+++ b/src/nvim/menu.c
@@ -1,3 +1,6 @@
+// This is an open source non-commercial project. Dear PVS-Studio, please check
+// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
+
/*
* Code for menus. Used for the GUI and 'wildmenu'.
* GUI/Motif support by Robert Webb
diff --git a/src/nvim/menu.h b/src/nvim/menu.h
index 3266c511b4..a84b7d812e 100644
--- a/src/nvim/menu.h
+++ b/src/nvim/menu.h
@@ -1,6 +1,11 @@
#ifndef NVIM_MENU_H
#define NVIM_MENU_H
+#include <stdbool.h> // for bool
+
+#include "nvim/types.h" // for char_u and expand_T
+#include "nvim/ex_cmds_defs.h" // for exarg_T
+
/* Indices into vimmenu_T->strings[] and vimmenu_T->noremap[] for each mode */
#define MENU_INDEX_INVALID -1
#define MENU_INDEX_NORMAL 0
diff --git a/src/nvim/message.c b/src/nvim/message.c
index 83f2735b50..146937c25a 100644
--- a/src/nvim/message.c
+++ b/src/nvim/message.c
@@ -1,3 +1,6 @@
+// This is an open source non-commercial project. Dear PVS-Studio, please check
+// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
+
/*
* message.c: functions for displaying messages on the command line
*/
@@ -573,16 +576,17 @@ void emsg_invreg(int name)
/// Print an error message with unknown number of arguments
bool emsgf(const char *const fmt, ...)
{
+ static char errbuf[IOSIZE];
if (emsg_not_now()) {
return true;
}
va_list ap;
va_start(ap, fmt);
- vim_vsnprintf((char *) IObuff, IOSIZE, fmt, ap, NULL);
+ vim_vsnprintf(errbuf, sizeof(errbuf), fmt, ap, NULL);
va_end(ap);
- return emsg(IObuff);
+ return emsg((const char_u *)errbuf);
}
static void msg_emsgf_event(void **argv)
@@ -1164,15 +1168,9 @@ int msg_outtrans_len_attr(char_u *msgstr, int len, int attr)
* Normal characters are printed several at a time.
*/
while (--len >= 0) {
- if (enc_utf8) {
- // Don't include composing chars after the end.
- mb_l = utfc_ptr2len_len((char_u *)str, len + 1);
- } else if (has_mbyte) {
- mb_l = (*mb_ptr2len)((char_u *)str);
- } else {
- mb_l = 1;
- }
- if (has_mbyte && mb_l > 1) {
+ // Don't include composing chars after the end.
+ mb_l = utfc_ptr2len_len((char_u *)str, len + 1);
+ if (mb_l > 1) {
c = (*mb_ptr2char)((char_u *)str);
if (vim_isprintc(c)) {
// Printable multi-byte char: count the cells.
@@ -1662,16 +1660,13 @@ static void msg_puts_display(const char_u *str, int maxlen, int attr,
// Display char in last column before showing more-prompt.
if (*s >= ' ' && !cmdmsg_rl) {
- if (has_mbyte) {
- if (enc_utf8 && maxlen >= 0)
- /* avoid including composing chars after the end */
- l = utfc_ptr2len_len(s, (int)((str + maxlen) - s));
- else
- l = (*mb_ptr2len)(s);
- s = screen_puts_mbyte((char_u *)s, l, attr);
+ if (maxlen >= 0) {
+ // Avoid including composing chars after the end.
+ l = utfc_ptr2len_len(s, (int)((str + maxlen) - s));
} else {
- msg_screen_putchar(*s++, attr);
+ l = utfc_ptr2len(s);
}
+ s = screen_puts_mbyte((char_u *)s, l, attr);
did_last_char = true;
} else {
did_last_char = false;
@@ -2729,8 +2724,8 @@ do_dialog (
break;
}
- /* Make the character lowercase, as chars in "hotkeys" are. */
- c = vim_tolower(c);
+ // Make the character lowercase, as chars in "hotkeys" are.
+ c = mb_tolower(c);
retval = 1;
for (i = 0; hotkeys[i]; ++i) {
if (has_mbyte) {
@@ -2776,7 +2771,7 @@ copy_char (
if (has_mbyte) {
if (lowercase) {
- c = vim_tolower((*mb_ptr2char)(from));
+ c = mb_tolower((*mb_ptr2char)(from));
return (*mb_char2bytes)(c, to);
} else {
len = (*mb_ptr2len)(from);
diff --git a/src/nvim/misc1.c b/src/nvim/misc1.c
index 0b74b4437e..6de74fddf2 100644
--- a/src/nvim/misc1.c
+++ b/src/nvim/misc1.c
@@ -1,3 +1,6 @@
+// This is an open source non-commercial project. Dear PVS-Studio, please check
+// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
+
/*
* misc1.c: functions that didn't seem to fit elsewhere
*/
@@ -2678,7 +2681,8 @@ void fast_breakcheck(void)
}
}
-// Call shell. Calls os_call_shell, with 'shellxquote' added.
+// os_call_shell wrapper. Handles 'verbose', :profile, and v:shell_error.
+// Invalidates cached tags.
int call_shell(char_u *cmd, ShellOpts opts, char_u *extra_shell_arg)
{
int retval;
@@ -2686,8 +2690,7 @@ int call_shell(char_u *cmd, ShellOpts opts, char_u *extra_shell_arg)
if (p_verbose > 3) {
verbose_enter();
- smsg(_("Calling shell to execute: \"%s\""),
- cmd == NULL ? p_sh : cmd);
+ smsg(_("Calling shell to execute: \"%s\""), cmd == NULL ? p_sh : cmd);
ui_putc('\n');
verbose_leave();
}
diff --git a/src/nvim/mouse.c b/src/nvim/mouse.c
index 2ebe199f47..b1c146d406 100644
--- a/src/nvim/mouse.c
+++ b/src/nvim/mouse.c
@@ -1,3 +1,6 @@
+// This is an open source non-commercial project. Dear PVS-Studio, please check
+// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
+
#include <stdbool.h>
#include "nvim/mouse.h"
@@ -456,6 +459,7 @@ void setmouse(void)
{
int checkfor;
+ ui_cursor_shape();
/* be quick when mouse is off */
if (*p_mouse == NUL)
diff --git a/src/nvim/move.c b/src/nvim/move.c
index 4feabf624b..d5be4cb8c3 100644
--- a/src/nvim/move.c
+++ b/src/nvim/move.c
@@ -1,3 +1,6 @@
+// This is an open source non-commercial project. Dear PVS-Studio, please check
+// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
+
/*
* move.c: Functions for moving the cursor and scrolling text.
*
diff --git a/src/nvim/move.h b/src/nvim/move.h
index 3f3bf70929..00fbcc580f 100644
--- a/src/nvim/move.h
+++ b/src/nvim/move.h
@@ -2,6 +2,8 @@
#define NVIM_MOVE_H
#include <stdbool.h>
+#include "nvim/buffer_defs.h"
+#include "nvim/pos.h"
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "move.h.generated.h"
diff --git a/src/nvim/msgpack_rpc/channel.c b/src/nvim/msgpack_rpc/channel.c
index 259dcc523c..59594357de 100644
--- a/src/nvim/msgpack_rpc/channel.c
+++ b/src/nvim/msgpack_rpc/channel.c
@@ -1,3 +1,6 @@
+// This is an open source non-commercial project. Dear PVS-Studio, please check
+// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
+
#include <stdbool.h>
#include <string.h>
#include <inttypes.h>
@@ -189,7 +192,7 @@ Object channel_send_call(uint64_t id,
Channel *channel = NULL;
if (!(channel = pmap_get(uint64_t)(channels, id)) || channel->closed) {
- api_set_error(err, Exception, _("Invalid channel \"%" PRIu64 "\""), id);
+ api_set_error(err, kErrorTypeException, "Invalid channel: %" PRIu64, id);
api_free_array(args);
return NIL;
}
@@ -209,7 +212,8 @@ Object channel_send_call(uint64_t id,
if (frame.errored) {
if (frame.result.type == kObjectTypeString) {
- api_set_error(err, Exception, "%s", frame.result.data.string.data);
+ api_set_error(err, kErrorTypeException, "%s",
+ frame.result.data.string.data);
} else if (frame.result.type == kObjectTypeArray) {
// Should be an error in the form [type, message]
Array array = frame.result.data.array;
@@ -217,14 +221,13 @@ Object channel_send_call(uint64_t id,
&& (array.items[0].data.integer == kErrorTypeException
|| array.items[0].data.integer == kErrorTypeValidation)
&& array.items[1].type == kObjectTypeString) {
- err->type = (ErrorType) array.items[0].data.integer;
- xstrlcpy(err->msg, array.items[1].data.string.data, sizeof(err->msg));
- err->set = true;
+ api_set_error(err, (ErrorType)array.items[0].data.integer, "%s",
+ array.items[1].data.string.data);
} else {
- api_set_error(err, Exception, "%s", "unknown error");
+ api_set_error(err, kErrorTypeException, "%s", "unknown error");
}
} else {
- api_set_error(err, Exception, "%s", "unknown error");
+ api_set_error(err, kErrorTypeException, "%s", "unknown error");
}
api_free_object(frame.result);
@@ -395,7 +398,7 @@ static void handle_request(Channel *channel, msgpack_object *request)
Error error = ERROR_INIT;
msgpack_rpc_validate(&request_id, request, &error);
- if (error.set) {
+ if (ERROR_SET(&error)) {
// Validation failed, send response with error
if (channel_write(channel,
serialize_response(channel->id,
@@ -409,9 +412,9 @@ static void handle_request(Channel *channel, msgpack_object *request)
channel->id);
call_set_error(channel, buf);
}
+ api_clear_error(&error);
return;
}
-
// Retrieve the request handler
MsgpackRpcRequestHandler handler;
msgpack_object *method = msgpack_rpc_method(request);
@@ -467,6 +470,7 @@ static void on_request_event(void **argv)
api_free_array(args);
decref(channel);
xfree(e);
+ api_clear_error(&error);
}
static bool channel_write(Channel *channel, WBuffer *buffer)
@@ -509,12 +513,13 @@ static bool channel_write(Channel *channel, WBuffer *buffer)
static void send_error(Channel *channel, uint64_t id, char *err)
{
Error e = ERROR_INIT;
- api_set_error(&e, Exception, "%s", err);
+ api_set_error(&e, kErrorTypeException, "%s", err);
channel_write(channel, serialize_response(channel->id,
id,
&e,
NIL,
&out_buffer));
+ api_clear_error(&e);
}
static void send_request(Channel *channel,
diff --git a/src/nvim/msgpack_rpc/helpers.c b/src/nvim/msgpack_rpc/helpers.c
index 808bb863fd..0228582d37 100644
--- a/src/nvim/msgpack_rpc/helpers.c
+++ b/src/nvim/msgpack_rpc/helpers.c
@@ -1,3 +1,6 @@
+// This is an open source non-commercial project. Dear PVS-Studio, please check
+// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
+
#include <stdint.h>
#include <stdbool.h>
#include <inttypes.h>
@@ -114,7 +117,13 @@ bool msgpack_rpc_to_object(const msgpack_object *const obj, Object *const arg)
}
break;
}
- case MSGPACK_OBJECT_FLOAT: {
+#ifdef NVIM_MSGPACK_HAS_FLOAT32
+ case MSGPACK_OBJECT_FLOAT32:
+ case MSGPACK_OBJECT_FLOAT64:
+#else
+ case MSGPACK_OBJECT_FLOAT:
+#endif
+ {
STATIC_ASSERT(sizeof(Float) == sizeof(cur.mobj->via.f64),
"Msgpack floating-point size does not match API integer");
*cur.aobj = FLOATING_OBJ(cur.mobj->via.f64);
@@ -181,7 +190,12 @@ bool msgpack_rpc_to_object(const msgpack_object *const obj, Object *const arg)
case MSGPACK_OBJECT_BOOLEAN:
case MSGPACK_OBJECT_POSITIVE_INTEGER:
case MSGPACK_OBJECT_NEGATIVE_INTEGER:
+#ifdef NVIM_MSGPACK_HAS_FLOAT32
+ case MSGPACK_OBJECT_FLOAT32:
+ case MSGPACK_OBJECT_FLOAT64:
+#else
case MSGPACK_OBJECT_FLOAT:
+#endif
case MSGPACK_OBJECT_EXT:
case MSGPACK_OBJECT_MAP:
case MSGPACK_OBJECT_ARRAY: {
@@ -461,8 +475,7 @@ Object msgpack_rpc_handle_missing_method(uint64_t channel_id,
Array args,
Error *error)
{
- snprintf(error->msg, sizeof(error->msg), "Invalid method name");
- error->set = true;
+ api_set_error(error, kErrorTypeException, "Invalid method name");
return NIL;
}
@@ -471,8 +484,7 @@ Object msgpack_rpc_handle_invalid_arguments(uint64_t channel_id,
Array args,
Error *error)
{
- snprintf(error->msg, sizeof(error->msg), "Invalid method arguments");
- error->set = true;
+ api_set_error(error, kErrorTypeException, "Invalid method arguments");
return NIL;
}
@@ -505,7 +517,7 @@ void msgpack_rpc_serialize_response(uint64_t response_id,
msgpack_pack_int(pac, 1);
msgpack_pack_uint64(pac, response_id);
- if (err->set) {
+ if (ERROR_SET(err)) {
// error represented by a [type, message] array
msgpack_pack_array(pac, 2);
msgpack_rpc_from_integer(err->type, pac);
@@ -558,49 +570,49 @@ void msgpack_rpc_validate(uint64_t *response_id,
*response_id = NO_RESPONSE;
// Validate the basic structure of the msgpack-rpc payload
if (req->type != MSGPACK_OBJECT_ARRAY) {
- api_set_error(err, Validation, _("Message is not an array"));
+ api_set_error(err, kErrorTypeValidation, "Message is not an array");
return;
}
if (req->via.array.size == 0) {
- api_set_error(err, Validation, _("Message is empty"));
+ api_set_error(err, kErrorTypeValidation, "Message is empty");
return;
}
if (req->via.array.ptr[0].type != MSGPACK_OBJECT_POSITIVE_INTEGER) {
- api_set_error(err, Validation, _("Message type must be an integer"));
+ api_set_error(err, kErrorTypeValidation, "Message type must be an integer");
return;
}
uint64_t type = req->via.array.ptr[0].via.u64;
if (type != kMessageTypeRequest && type != kMessageTypeNotification) {
- api_set_error(err, Validation, _("Unknown message type"));
+ api_set_error(err, kErrorTypeValidation, "Unknown message type");
return;
}
if ((type == kMessageTypeRequest && req->via.array.size != 4)
|| (type == kMessageTypeNotification && req->via.array.size != 3)) {
- api_set_error(err, Validation, _("Request array size should be 4 (request) "
- "or 3 (notification)"));
+ api_set_error(err, kErrorTypeValidation,
+ "Request array size must be 4 (request) or 3 (notification)");
return;
}
if (type == kMessageTypeRequest) {
msgpack_object *id_obj = msgpack_rpc_msg_id(req);
if (!id_obj) {
- api_set_error(err, Validation, _("ID must be a positive integer"));
+ api_set_error(err, kErrorTypeValidation, "ID must be a positive integer");
return;
}
*response_id = id_obj->via.u64;
}
if (!msgpack_rpc_method(req)) {
- api_set_error(err, Validation, _("Method must be a string"));
+ api_set_error(err, kErrorTypeValidation, "Method must be a string");
return;
}
if (!msgpack_rpc_args(req)) {
- api_set_error(err, Validation, _("Parameters must be an array"));
+ api_set_error(err, kErrorTypeValidation, "Parameters must be an array");
return;
}
}
diff --git a/src/nvim/msgpack_rpc/server.c b/src/nvim/msgpack_rpc/server.c
index d7c2926a0f..b6958088ca 100644
--- a/src/nvim/msgpack_rpc/server.c
+++ b/src/nvim/msgpack_rpc/server.c
@@ -1,3 +1,6 @@
+// This is an open source non-commercial project. Dear PVS-Studio, please check
+// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
+
#include <assert.h>
#include <stdlib.h>
#include <string.h>
diff --git a/src/nvim/normal.c b/src/nvim/normal.c
index d4919dc3b6..51da9429b6 100644
--- a/src/nvim/normal.c
+++ b/src/nvim/normal.c
@@ -1,3 +1,6 @@
+// This is an open source non-commercial project. Dear PVS-Studio, please check
+// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
+
/*
* normal.c: Contains the main routine for processing characters in command
* mode. Communicates closely with the code in ops.c to handle
@@ -694,7 +697,6 @@ static void normal_get_additional_char(NormalState *s)
if (langmap_active) {
// Undo the decrement done above
no_mapping++;
- State = NORMAL_BUSY;
}
State = NORMAL_BUSY;
s->need_flushbuf |= add_to_showcmd(*cp);
@@ -2334,10 +2336,11 @@ do_mouse (
if (regname == 0 && eval_has_provider("clipboard")) {
regname = '*';
}
- if ((State & REPLACE_FLAG) && !yank_register_mline(regname))
+ if ((State & REPLACE_FLAG) && !yank_register_mline(regname)) {
insert_reg(regname, true);
- else {
- do_put(regname, NULL, BACKWARD, 1L, fixindent | PUT_CURSEND);
+ } else {
+ do_put(regname, NULL, BACKWARD, 1L,
+ (fixindent ? PUT_FIXINDENT : 0) | PUT_CURSEND);
/* Repeat it with CTRL-R CTRL-O r or CTRL-R CTRL-P r */
AppendCharToRedobuff(Ctrl_R);
@@ -2689,7 +2692,8 @@ do_mouse (
*/
if (restart_edit != 0)
where_paste_started = curwin->w_cursor;
- do_put(regname, NULL, dir, count, fixindent | PUT_CURSEND);
+ do_put(regname, NULL, dir, count,
+ (fixindent ? PUT_FIXINDENT : 0)| PUT_CURSEND);
}
/*
* Ctrl-Mouse click or double click in a quickfix window jumps to the
@@ -4670,6 +4674,7 @@ static void nv_ident(cmdarg_T *cap)
char_u *kp = *curbuf->b_p_kp == NUL ? p_kp : curbuf->b_p_kp; // 'keywordprg'
assert(*kp != NUL); // option.c:do_set() should default to ":help" if empty.
bool kp_ex = (*kp == ':'); // 'keywordprg' is an ex command
+ bool kp_help = (STRCMP(kp, ":he") == 0 || STRCMP(kp, ":help") == 0);
size_t buf_size = n * 2 + 30 + STRLEN(kp);
char *buf = xmalloc(buf_size);
buf[0] = NUL;
@@ -4692,7 +4697,9 @@ static void nv_ident(cmdarg_T *cap)
break;
case 'K':
- if (kp_ex) {
+ if (kp_help) {
+ STRCPY(buf, "he! ");
+ } else if (kp_ex) {
if (cap->count0 != 0) { // Send the count to the ex command.
snprintf(buf, buf_size, "%" PRId64, (int64_t)(cap->count0));
}
@@ -4755,7 +4762,7 @@ static void nv_ident(cmdarg_T *cap)
}
// Now grab the chars in the identifier
- if (cmdchar == 'K') {
+ if (cmdchar == 'K' && !kp_help) {
ptr = vim_strnsave(ptr, n);
if (kp_ex) {
// Escape the argument properly for an Ex command
@@ -7609,11 +7616,13 @@ static void nv_record(cmdarg_T *cap)
if (cap->nchar == ':' || cap->nchar == '/' || cap->nchar == '?') {
stuffcharReadbuff(cap->nchar);
stuffcharReadbuff(K_CMDWIN);
- } else
- /* (stop) recording into a named register, unless executing a
- * register */
- if (!Exec_reg && do_record(cap->nchar) == false)
- clearopbeep(cap->oap);
+ } else {
+ // (stop) recording into a named register, unless executing a
+ // register.
+ if (!Exec_reg && do_record(cap->nchar) == FAIL) {
+ clearopbeep(cap->oap);
+ }
+ }
}
}
diff --git a/src/nvim/ops.c b/src/nvim/ops.c
index 68ef27222c..c77781b1d1 100644
--- a/src/nvim/ops.c
+++ b/src/nvim/ops.c
@@ -1,3 +1,6 @@
+// This is an open source non-commercial project. Dear PVS-Studio, please check
+// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
+
/*
* ops.c: implementation of various operators: op_shift, op_delete, op_tilde,
* op_change, op_yank, do_put, do_join
@@ -802,7 +805,6 @@ static bool is_append_register(int regname)
/// Returns a copy of contents in register `name`
/// for use in do_put. Should be freed by caller.
yankreg_T *copy_register(int name)
- FUNC_ATTR_MALLOC
FUNC_ATTR_NONNULL_RET
{
yankreg_T *reg = get_yank_register(name, YREG_PASTE);
@@ -1956,16 +1958,18 @@ int swapchar(int op_type, pos_T *pos)
if (enc_dbcs != 0 && c >= 0x100) /* No lower/uppercase letter */
return FALSE;
nc = c;
- if (vim_islower(c)) {
- if (op_type == OP_ROT13)
+ if (mb_islower(c)) {
+ if (op_type == OP_ROT13) {
nc = ROT13(c, 'a');
- else if (op_type != OP_LOWER)
- nc = vim_toupper(c);
- } else if (vim_isupper(c)) {
- if (op_type == OP_ROT13)
+ } else if (op_type != OP_LOWER) {
+ nc = mb_toupper(c);
+ }
+ } else if (mb_isupper(c)) {
+ if (op_type == OP_ROT13) {
nc = ROT13(c, 'A');
- else if (op_type != OP_UPPER)
- nc = vim_tolower(c);
+ } else if (op_type != OP_UPPER) {
+ nc = mb_tolower(c);
+ }
}
if (nc != c) {
if (enc_utf8 && (c >= 0x80 || nc >= 0x80)) {
@@ -2784,7 +2788,7 @@ void do_put(int regname, yankreg_T *reg, int dir, long count, int flags)
}
if (curbuf->terminal) {
- for (int i = 0; i < count; i++) {
+ for (int i = 0; i < count; i++) { // -V756
// feed the lines to the terminal
for (size_t j = 0; j < y_size; j++) {
if (j) {
@@ -3327,10 +3331,11 @@ void ex_display(exarg_T *eap)
get_clipboard(name, &yb, true);
- if (name == vim_tolower(redir_reg)
- || (redir_reg == '"' && yb == y_previous))
- continue; /* do not list register being written to, the
- * pointer can be freed */
+ if (name == mb_tolower(redir_reg)
+ || (redir_reg == '"' && yb == y_previous)) {
+ continue; // do not list register being written to, the
+ // pointer can be freed
+ }
if (yb->y_array != NULL) {
msg_putchar('\n');
diff --git a/src/nvim/ops.h b/src/nvim/ops.h
index 13d0142343..a8867e02ea 100644
--- a/src/nvim/ops.h
+++ b/src/nvim/ops.h
@@ -8,6 +8,8 @@
#include "nvim/types.h"
#include "nvim/eval/typval.h"
#include "nvim/os/time.h"
+#include "nvim/normal.h" // for MotionType and oparg_T
+#include "nvim/ex_cmds_defs.h" // for exarg_T
typedef int (*Indenter)(void);
diff --git a/src/nvim/option.c b/src/nvim/option.c
index eddfdd6218..74392ccfb5 100644
--- a/src/nvim/option.c
+++ b/src/nvim/option.c
@@ -1,3 +1,6 @@
+// This is an open source non-commercial project. Dear PVS-Studio, please check
+// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
+
// User-settable options. Checklist for adding a new option:
// - Put it in options.lua
// - For a global option: Add a variable for it in option_defs.h.
@@ -246,7 +249,8 @@ typedef struct vimoption {
"A:DiffAdd,C:DiffChange,D:DiffDelete,T:DiffText,>:SignColumn,-:Conceal," \
"B:SpellBad,P:SpellCap,R:SpellRare,L:SpellLocal,+:Pmenu,=:PmenuSel," \
"x:PmenuSbar,X:PmenuThumb,*:TabLine,#:TabLineSel,_:TabLineFill," \
- "!:CursorColumn,.:CursorLine,o:ColorColumn,q:QuickFixLine"
+ "!:CursorColumn,.:CursorLine,o:ColorColumn,q:QuickFixLine," \
+ "0:Whitespace"
/*
* options[] is initialized here.
@@ -939,11 +943,8 @@ void free_all_options(void)
#endif
-/*
- * Initialize the options, part two: After getting Rows and Columns and
- * setting 'term'.
- */
-void set_init_2(void)
+/// Initialize the options, part two: After getting Rows and Columns.
+void set_init_2(bool headless)
{
int idx;
@@ -966,8 +967,12 @@ void set_init_2(void)
p_window = Rows - 1;
}
set_number_default("window", Rows - 1);
- parse_shape_opt(SHAPE_CURSOR); /* set cursor shapes from 'guicursor' */
- (void)parse_printoptions(); /* parse 'printoptions' default value */
+ if (!headless && !os_term_is_nice()) {
+ set_string_option_direct((char_u *)"guicursor", -1, (char_u *)"",
+ OPT_GLOBAL, SID_NONE);
+ }
+ parse_shape_opt(SHAPE_CURSOR); // set cursor shapes from 'guicursor'
+ (void)parse_printoptions(); // parse 'printoptions' default value
}
/*
@@ -1055,13 +1060,15 @@ void set_init_3(void)
*/
void set_helplang_default(const char *lang)
{
- int idx;
+ if (lang == NULL) {
+ return;
+ }
const size_t lang_len = strlen(lang);
- if (lang == NULL || lang_len < 2) { // safety check
+ if (lang_len < 2) { // safety check
return;
}
- idx = findoption("hlg");
+ int idx = findoption("hlg");
if (idx >= 0 && !(options[idx].flags & P_WAS_SET)) {
if (options[idx].flags & P_ALLOCED)
free_string_option(p_hlg);
@@ -2839,9 +2846,10 @@ did_set_string_option (
}
}
- /* 'guicursor' */
- else if (varp == &p_guicursor)
+ // 'guicursor'
+ else if (varp == &p_guicursor) {
errmsg = parse_shape_opt(SHAPE_CURSOR);
+ }
else if (varp == &p_popt)
errmsg = parse_printoptions();
@@ -3628,6 +3636,12 @@ static char *set_bool_option(const int opt_idx, char_u *const varp,
} else if ((int *)varp == &p_force_off && p_force_off == true) {
p_force_off = false;
return (char *)e_unsupportedoption;
+ } else if ((int *)varp == &p_lrm) {
+ // 'langremap' -> !'langnoremap'
+ p_lnr = !p_lrm;
+ } else if ((int *)varp == &p_lnr) {
+ // 'langnoremap' -> !'langremap'
+ p_lrm = !p_lnr;
// 'undofile'
} else if ((int *)varp == &curbuf->b_p_udf || (int *)varp == &p_udf) {
// Only take action when the option was set. When reset we do not
@@ -4121,7 +4135,7 @@ static char *set_num_option(int opt_idx, char_u *varp, long value,
}
} else if (pp == &curbuf->b_p_scbk || pp == &p_scbk) {
if (value < -1 || value > SB_MAX
- || (opt_flags == OPT_LOCAL && !curbuf->terminal)) {
+ || (value != -1 && opt_flags == OPT_LOCAL && !curbuf->terminal)) {
errmsg = e_invarg;
}
} else if (pp == &curbuf->b_p_sw || pp == &p_sw) {
@@ -4781,7 +4795,7 @@ int find_key_option_len(const char_u *arg, size_t len)
} else {
arg--; // put arg at the '<'
modifiers = 0;
- key = find_special_key(&arg, len + 1, &modifiers, true, true);
+ key = find_special_key(&arg, len + 1, &modifiers, true, true, false);
if (modifiers) { // can't handle modifiers here
key = 0;
}
@@ -6937,7 +6951,7 @@ bool signcolumn_on(win_T *wp)
/// Get window or buffer local options
dict_T *get_winbuf_options(const int bufopt)
- FUNC_ATTR_WARN_UNUSED_RESULT FUNC_ATTR_MALLOC
+ FUNC_ATTR_WARN_UNUSED_RESULT
{
dict_T *const d = tv_dict_alloc();
diff --git a/src/nvim/option_defs.h b/src/nvim/option_defs.h
index 2475a0b6a1..4ee0f4f225 100644
--- a/src/nvim/option_defs.h
+++ b/src/nvim/option_defs.h
@@ -476,8 +476,9 @@ EXTERN char_u *p_isp; // 'isprint'
EXTERN int p_js; // 'joinspaces'
EXTERN char_u *p_kp; // 'keywordprg'
EXTERN char_u *p_km; // 'keymodel'
-EXTERN char_u *p_langmap; // 'langmap'*/
-EXTERN int p_lnr; // 'langnoremap'*/
+EXTERN char_u *p_langmap; // 'langmap'
+EXTERN int p_lnr; // 'langnoremap'
+EXTERN int p_lrm; // 'langremap'
EXTERN char_u *p_lm; // 'langmenu'
EXTERN char_u *p_lispwords; // 'lispwords'
EXTERN long p_ls; // 'laststatus'
diff --git a/src/nvim/options.lua b/src/nvim/options.lua
index ee2b8a563d..4e7be63b63 100644
--- a/src/nvim/options.lua
+++ b/src/nvim/options.lua
@@ -1000,7 +1000,7 @@ return {
deny_duplicates=true,
vi_def=true,
varname='p_guicursor',
- defaults={if_true={vi="n-v-c:block,o:hor50,i-ci:hor15,r-cr:hor30,sm:block"}}
+ defaults={if_true={vi="n-v-c:block-Cursor/lCursor,ve:ver35-Cursor,o:hor50-Cursor,i-ci:ver25-Cursor/lCursor,r-cr:hor20-Cursor/lCursor,sm:block-Cursor-blinkwait175-blinkoff150-blinkon175"}}
},
{
full_name='guifont', abbreviation='gfn',
@@ -1026,13 +1026,6 @@ return {
enable_if=false,
},
{
- full_name='guiheadroom', abbreviation='ghr',
- type='number', scope={'global'},
- vi_def=true,
- enable_if=false,
- defaults={if_true={vi=50}}
- },
- {
full_name='guioptions', abbreviation='go',
type='string', list='flags', scope={'global'},
vi_def=true,
@@ -1347,6 +1340,12 @@ return {
defaults={if_true={vi=false, vim=true}}
},
{
+ full_name='langremap', abbreviation='lrm',
+ type='bool', scope={'global'},
+ varname='p_lrm',
+ defaults={if_true={vi=true, vim=false}}
+ },
+ {
full_name='laststatus', abbreviation='ls',
type='number', scope={'global'},
vim=true,
@@ -2052,7 +2051,11 @@ return {
secure=true,
vi_def=true,
varname='p_srr',
- defaults={if_true={vi=">"}}
+ defaults={
+ condition='WIN32',
+ if_true={vi=">%s 2>&1"},
+ if_false={vi=">"}
+ }
},
{
full_name='shellslash', abbreviation='ssl',
diff --git a/src/nvim/os/dl.c b/src/nvim/os/dl.c
index fef02cc784..267cf5ae4b 100644
--- a/src/nvim/os/dl.c
+++ b/src/nvim/os/dl.c
@@ -1,3 +1,6 @@
+// This is an open source non-commercial project. Dear PVS-Studio, please check
+// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
+
/// Functions for using external native libraries
#include <stdbool.h>
diff --git a/src/nvim/os/env.c b/src/nvim/os/env.c
index a73d753e46..8f7a6e72b5 100644
--- a/src/nvim/os/env.c
+++ b/src/nvim/os/env.c
@@ -1,11 +1,11 @@
-// env.c -- environment variable access
+// This is an open source non-commercial project. Dear PVS-Studio, please check
+// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
-#include <assert.h>
+// Environment inspection
+#include <assert.h>
#include <uv.h>
-// vim.h must be included before charset.h (and possibly others) or things
-// blow up
#include "nvim/vim.h"
#include "nvim/ascii.h"
#include "nvim/charset.h"
@@ -118,7 +118,6 @@ char *os_getenvname_at_index(size_t index)
return name;
}
-
/// Get the process ID of the Neovim process.
///
/// @return the process ID.
@@ -145,10 +144,27 @@ void os_get_hostname(char *hostname, size_t size)
} else {
xstrlcpy(hostname, vutsname.nodename, size);
}
+#elif defined(WIN32)
+ WCHAR host_utf16[MAX_COMPUTERNAME_LENGTH + 1];
+ DWORD host_wsize = sizeof(host_utf16) / sizeof(host_utf16[0]);
+ if (GetComputerNameW(host_utf16, &host_wsize) == 0) {
+ *hostname = '\0';
+ DWORD err = GetLastError();
+ EMSG2("GetComputerNameW failed: %d", err);
+ return;
+ }
+ host_utf16[host_wsize] = '\0';
+
+ char *host_utf8;
+ int conversion_result = utf16_to_utf8(host_utf16, &host_utf8);
+ if (conversion_result != 0) {
+ EMSG2("utf16_to_utf8 failed: %d", conversion_result);
+ return;
+ }
+ xstrlcpy(hostname, host_utf8, size);
+ xfree(host_utf8);
#else
- // TODO(unknown): Implement this for windows.
- // See the implementation used in vim:
- // https://code.google.com/p/vim/source/browse/src/os_win32.c?r=6b69d8dde19e32909f4ee3a6337e6a2ecfbb6f72#2899
+ EMSG("os_get_hostname failed: missing uname()");
*hostname = '\0';
#endif
}
@@ -615,9 +631,9 @@ char *vim_getenv(const char *name)
vim_path = (char *)p_hf;
}
+ char exe_name[MAXPATHL];
// Find runtime path relative to the nvim binary: ../share/nvim/runtime
if (vim_path == NULL) {
- char exe_name[MAXPATHL];
size_t exe_name_len = MAXPATHL;
if (os_exepath(exe_name, &exe_name_len) == 0) {
char *path_end = (char *)path_tail_with_sep((char_u *)exe_name);
@@ -628,7 +644,7 @@ char *vim_getenv(const char *name)
exe_name,
"share" _PATHSEPSTR "nvim" _PATHSEPSTR "runtime" _PATHSEPSTR,
MAXPATHL) == OK) {
- vim_path = exe_name;
+ vim_path = exe_name; // -V507
}
}
}
@@ -662,6 +678,7 @@ char *vim_getenv(const char *name)
vim_path = NULL;
}
}
+ assert(vim_path != exe_name);
}
#ifdef HAVE_PATHDEF
@@ -703,7 +720,8 @@ char *vim_getenv(const char *name)
/// @param dstlen Maximum length of the result
/// @param one If true, only replace one file name, including spaces and commas
/// in the file name
-void home_replace(buf_T *buf, char_u *src, char_u *dst, int dstlen, bool one)
+void home_replace(const buf_T *const buf, const char_u *src,
+ char_u *dst, size_t dstlen, bool one)
{
size_t dirlen = 0, envlen = 0;
size_t len;
@@ -717,7 +735,7 @@ void home_replace(buf_T *buf, char_u *src, char_u *dst, int dstlen, bool one)
* If the file is a help file, remove the path completely.
*/
if (buf != NULL && buf->b_help) {
- STRCPY(dst, path_tail(src));
+ xstrlcpy((char *)dst, (char *)path_tail(src), dstlen);
return;
}
@@ -809,7 +827,7 @@ char_u * home_replace_save(buf_T *buf, char_u *src) FUNC_ATTR_NONNULL_RET
len += STRLEN(src);
}
char_u *dst = xmalloc(len);
- home_replace(buf, src, dst, (int)len, true);
+ home_replace(buf, src, dst, len, true);
return dst;
}
@@ -888,3 +906,45 @@ bool os_setenv_append_path(const char *fname)
}
return false;
}
+
+/// Returns true if the terminal can be assumed to silently ignore unknown
+/// control codes.
+bool os_term_is_nice(void)
+{
+#if defined(__APPLE__) || defined(WIN32)
+ return true;
+#else
+ const char *vte_version = os_getenv("VTE_VERSION");
+ if ((vte_version && atoi(vte_version) >= 3900)
+ || os_getenv("KONSOLE_PROFILE_NAME")
+ || os_getenv("KONSOLE_DBUS_SESSION")) {
+ return true;
+ }
+ const char *termprg = os_getenv("TERM_PROGRAM");
+ if (termprg && striequal(termprg, "iTerm.app")) {
+ return true;
+ }
+ const char *term = os_getenv("TERM");
+ if (term && strncmp(term, "rxvt", 4) == 0) {
+ return true;
+ }
+ return false;
+#endif
+}
+
+/// Returns true if `sh` looks like it resolves to "cmd.exe".
+bool os_shell_is_cmdexe(const char *sh)
+ FUNC_ATTR_NONNULL_ALL
+{
+ if (*sh == NUL) {
+ return false;
+ }
+ if (striequal(sh, "$COMSPEC")) {
+ const char *comspec = os_getenv("COMSPEC");
+ return striequal("cmd.exe", (char *)path_tail((char_u *)comspec));
+ }
+ if (striequal(sh, "cmd.exe") || striequal(sh, "cmd")) {
+ return true;
+ }
+ return striequal("cmd.exe", (char *)path_tail((char_u *)sh));
+}
diff --git a/src/nvim/os/fileio.c b/src/nvim/os/fileio.c
index 775f2bd449..4309ac723c 100644
--- a/src/nvim/os/fileio.c
+++ b/src/nvim/os/fileio.c
@@ -1,3 +1,6 @@
+// This is an open source non-commercial project. Dear PVS-Studio, please check
+// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
+
/// @file fileio.c
///
/// Buffered reading/writing to a file. Unlike fileio.c this is not dealing with
@@ -47,6 +50,7 @@ int file_open(FileDescriptor *const ret_fp, const char *const fname,
int os_open_flags = 0;
int fd;
TriState wr = kNone;
+ // -V:FLAG:501
#define FLAG(flags, flag, fcntl_flags, wrval, cond) \
do { \
if (flags & flag) { \
@@ -100,7 +104,7 @@ int file_open(FileDescriptor *const ret_fp, const char *const fname,
/// @return [allocated] Opened file or NULL in case of error.
FileDescriptor *file_open_new(int *const error, const char *const fname,
const int flags, const int mode)
- FUNC_ATTR_NONNULL_ALL FUNC_ATTR_MALLOC FUNC_ATTR_WARN_UNUSED_RESULT
+ FUNC_ATTR_NONNULL_ALL FUNC_ATTR_WARN_UNUSED_RESULT
{
FileDescriptor *const fp = xmalloc(sizeof(*fp));
if ((*error = file_open(fp, fname, flags, mode)) != 0) {
@@ -113,27 +117,31 @@ FileDescriptor *file_open_new(int *const error, const char *const fname,
/// Close file and free its buffer
///
/// @param[in,out] fp File to close.
+/// @param[in] do_fsync If true, use fsync() to write changes to disk.
///
/// @return 0 or error code.
-int file_close(FileDescriptor *const fp) FUNC_ATTR_NONNULL_ALL
+int file_close(FileDescriptor *const fp, const bool do_fsync)
+ FUNC_ATTR_NONNULL_ALL
{
- const int error = file_fsync(fp);
- const int error2 = os_close(fp->fd);
+ const int flush_error = (do_fsync ? file_fsync(fp) : file_flush(fp));
+ const int close_error = os_close(fp->fd);
rbuffer_free(fp->rv);
- if (error2 != 0) {
- return error2;
+ if (close_error != 0) {
+ return close_error;
}
- return error;
+ return flush_error;
}
/// Close and free file obtained using file_open_new()
///
/// @param[in,out] fp File to close.
+/// @param[in] do_fsync If true, use fsync() to write changes to disk.
///
/// @return 0 or error code.
-int file_free(FileDescriptor *const fp) FUNC_ATTR_NONNULL_ALL
+int file_free(FileDescriptor *const fp, const bool do_fsync)
+ FUNC_ATTR_NONNULL_ALL
{
- const int ret = file_close(fp);
+ const int ret = file_close(fp, do_fsync);
xfree(fp);
return ret;
}
@@ -143,21 +151,36 @@ int file_free(FileDescriptor *const fp) FUNC_ATTR_NONNULL_ALL
/// @param[in,out] fp File to work with.
///
/// @return 0 or error code.
-int file_fsync(FileDescriptor *const fp)
+int file_flush(FileDescriptor *const fp)
FUNC_ATTR_NONNULL_ALL
{
if (!fp->wr) {
return 0;
}
file_rb_write_full_cb(fp->rv, fp);
- if (fp->_error != 0) {
- const int error = fp->_error;
- fp->_error = 0;
- return error;
+ const int error = fp->_error;
+ fp->_error = 0;
+ return error;
+}
+
+/// Flush file modifications to disk and run fsync()
+///
+/// @param[in,out] fp File to work with.
+///
+/// @return 0 or error code.
+int file_fsync(FileDescriptor *const fp)
+ FUNC_ATTR_NONNULL_ALL
+{
+ if (!fp->wr) {
+ return 0;
}
- const int error = os_fsync(fp->fd);
- if (error != UV_EINVAL && error != UV_EROFS) {
- return error;
+ const int flush_error = file_flush(fp);
+ if (flush_error != 0) {
+ return flush_error;
+ }
+ const int fsync_error = os_fsync(fp->fd);
+ if (fsync_error != UV_EINVAL && fsync_error != UV_EROFS) {
+ return fsync_error;
}
return 0;
}
diff --git a/src/nvim/os/fs.c b/src/nvim/os/fs.c
index 3833a43f5f..c39ff5d358 100644
--- a/src/nvim/os/fs.c
+++ b/src/nvim/os/fs.c
@@ -1,3 +1,6 @@
+// This is an open source non-commercial project. Dear PVS-Studio, please check
+// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
+
// fs.c -- filesystem access
#include <stdbool.h>
#include <stddef.h>
@@ -1009,7 +1012,7 @@ char *os_resolve_shortcut(const char *fname)
WCHAR *p;
const int conversion_result = utf8_to_utf16(fname, &p);
if (conversion_result != 0) {
- EMSG2("utf8_to_utf16 failed: %s", uv_strerror(conversion_result));
+ EMSG2("utf8_to_utf16 failed: %d", conversion_result);
}
if (p != NULL) {
diff --git a/src/nvim/os/input.c b/src/nvim/os/input.c
index 5f0f2ec677..7b5e14dd19 100644
--- a/src/nvim/os/input.c
+++ b/src/nvim/os/input.c
@@ -1,3 +1,6 @@
+// This is an open source non-commercial project. Dear PVS-Studio, please check
+// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
+
#include <assert.h>
#include <string.h>
#include <stdbool.h>
@@ -182,7 +185,8 @@ size_t input_enqueue(String keys)
while (rbuffer_space(input_buffer) >= 6 && ptr < end) {
uint8_t buf[6] = { 0 };
unsigned int new_size
- = trans_special((const uint8_t **)&ptr, (size_t)(end - ptr), buf, true);
+ = trans_special((const uint8_t **)&ptr, (size_t)(end - ptr), buf, true,
+ true);
if (new_size) {
new_size = handle_mouse_event(&ptr, buf, new_size);
diff --git a/src/nvim/os/mem.c b/src/nvim/os/mem.c
index 871ece7a0e..eccb3c97e5 100644
--- a/src/nvim/os/mem.c
+++ b/src/nvim/os/mem.c
@@ -1,3 +1,6 @@
+// This is an open source non-commercial project. Dear PVS-Studio, please check
+// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
+
/// Functions for accessing system memory information.
#include <uv.h>
diff --git a/src/nvim/os/pty_process_unix.c b/src/nvim/os/pty_process_unix.c
index 71a5e13de5..eb9335b03c 100644
--- a/src/nvim/os/pty_process_unix.c
+++ b/src/nvim/os/pty_process_unix.c
@@ -1,3 +1,6 @@
+// This is an open source non-commercial project. Dear PVS-Studio, please check
+// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
+
// Some of the code came from pangoterm and libuv
#include <stdbool.h>
#include <stdlib.h>
diff --git a/src/nvim/os/shell.c b/src/nvim/os/shell.c
index b449cc3d5a..fc8ab7dc8f 100644
--- a/src/nvim/os/shell.c
+++ b/src/nvim/os/shell.c
@@ -1,3 +1,6 @@
+// This is an open source non-commercial project. Dear PVS-Studio, please check
+// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
+
#include <string.h>
#include <assert.h>
#include <stdbool.h>
@@ -47,7 +50,7 @@ typedef struct {
/// @param extra_args Extra arguments to the shell, or NULL.
/// @return Newly allocated argument vector. Must be freed with shell_free_argv.
char **shell_build_argv(const char *cmd, const char *extra_args)
- FUNC_ATTR_NONNULL_RET FUNC_ATTR_MALLOC
+ FUNC_ATTR_NONNULL_RET
{
size_t argc = tokenize(p_sh, NULL) + (cmd ? tokenize(p_shcf, NULL) : 0);
char **rv = xmalloc((argc + 4) * sizeof(*rv));
@@ -124,11 +127,9 @@ int os_call_shell(char_u *cmd, ShellOpts opts, char_u *extra_args)
}
size_t nread;
-
int exitcode = do_os_system(shell_build_argv((char *)cmd, (char *)extra_args),
input.data, input.len, output_ptr, &nread,
emsg_silent, forward_output);
-
xfree(input.data);
if (output) {
diff --git a/src/nvim/os/signal.c b/src/nvim/os/signal.c
index 1ac6d3f5e1..fd6d3b32e4 100644
--- a/src/nvim/os/signal.c
+++ b/src/nvim/os/signal.c
@@ -1,3 +1,6 @@
+// This is an open source non-commercial project. Dear PVS-Studio, please check
+// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
+
#include <assert.h>
#include <stdbool.h>
diff --git a/src/nvim/os/stdpaths.c b/src/nvim/os/stdpaths.c
index afb9bdec31..a41fb7c621 100644
--- a/src/nvim/os/stdpaths.c
+++ b/src/nvim/os/stdpaths.c
@@ -1,3 +1,6 @@
+// This is an open source non-commercial project. Dear PVS-Studio, please check
+// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
+
#include <stdbool.h>
#include "nvim/os/stdpaths_defs.h"
diff --git a/src/nvim/os/time.c b/src/nvim/os/time.c
index 8ce2ecf4f4..c471352c02 100644
--- a/src/nvim/os/time.c
+++ b/src/nvim/os/time.c
@@ -1,3 +1,6 @@
+// This is an open source non-commercial project. Dear PVS-Studio, please check
+// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
+
#include <assert.h>
#include <stdint.h>
#include <stdbool.h>
diff --git a/src/nvim/os/users.c b/src/nvim/os/users.c
index 1c94ef0067..82bb918f70 100644
--- a/src/nvim/os/users.c
+++ b/src/nvim/os/users.c
@@ -1,3 +1,6 @@
+// This is an open source non-commercial project. Dear PVS-Studio, please check
+// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
+
// users.c -- operating system user information
#include <uv.h>
diff --git a/src/nvim/os_unix.c b/src/nvim/os_unix.c
index acd86f06dc..c5a42204be 100644
--- a/src/nvim/os_unix.c
+++ b/src/nvim/os_unix.c
@@ -1,3 +1,6 @@
+// This is an open source non-commercial project. Dear PVS-Studio, please check
+// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
+
/*
* os_unix.c -- code for all flavors of Unix (BSD, SYSV, SVR4, POSIX, ...)
*
diff --git a/src/nvim/path.c b/src/nvim/path.c
index d0248690d9..12952f49db 100644
--- a/src/nvim/path.c
+++ b/src/nvim/path.c
@@ -1,3 +1,6 @@
+// This is an open source non-commercial project. Dear PVS-Studio, please check
+// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
+
#include <assert.h>
#include <inttypes.h>
#include <stdbool.h>
@@ -84,15 +87,15 @@ FileComparison path_full_compare(char_u *s1, char_u *s2, int checkname)
///
/// @return pointer just past the last path separator (empty string, if fname
/// ends in a slash), or empty string if fname is NULL.
-char_u *path_tail(char_u *fname)
+char_u *path_tail(const char_u *fname)
FUNC_ATTR_NONNULL_RET
{
if (fname == NULL) {
return (char_u *)"";
}
- char_u *tail = get_past_head(fname);
- char_u *p = tail;
+ const char_u *tail = get_past_head(fname);
+ const char_u *p = tail;
// Find last part of path.
while (*p != NUL) {
if (vim_ispathsep_nocolon(*p)) {
@@ -100,7 +103,7 @@ char_u *path_tail(char_u *fname)
}
mb_ptr_adv(p);
}
- return tail;
+ return (char_u *)tail;
}
/// Get pointer to tail of "fname", including path separators.
@@ -174,9 +177,9 @@ const char *path_next_component(const char *fname)
/// Get a pointer to one character past the head of a path name.
/// Unix: after "/"; Win: after "c:\"
/// If there is no head, path is returned.
-char_u *get_past_head(char_u *path)
+char_u *get_past_head(const char_u *path)
{
- char_u *retval = path;
+ const char_u *retval = path;
#ifdef WIN32
// May skip "c:"
@@ -189,7 +192,7 @@ char_u *get_past_head(char_u *path)
++retval;
}
- return retval;
+ return (char_u *)retval;
}
/*
@@ -1853,7 +1856,7 @@ int pathcmp(const char *p, const char *q, int maxlen)
break;
}
- if ((p_fic ? vim_toupper(c1) != vim_toupper(c2) : c1 != c2)
+ if ((p_fic ? mb_toupper(c1) != mb_toupper(c2) : c1 != c2)
#ifdef BACKSLASH_IN_FILENAME
/* consider '/' and '\\' to be equal */
&& !((c1 == '/' && c2 == '\\')
@@ -1864,8 +1867,8 @@ int pathcmp(const char *p, const char *q, int maxlen)
return -1;
if (vim_ispathsep(c2))
return 1;
- return p_fic ? vim_toupper(c1) - vim_toupper(c2)
- : c1 - c2; /* no match */
+ return p_fic ? mb_toupper(c1) - mb_toupper(c2)
+ : c1 - c2; // no match
}
i += MB_PTR2LEN((char_u *)p + i);
diff --git a/src/nvim/po/fi.po b/src/nvim/po/fi.po
index d30faeb554..3551c07ff2 100644
--- a/src/nvim/po/fi.po
+++ b/src/nvim/po/fi.po
@@ -1,247 +1,419 @@
# Finnish translation for Vim.
# Copyright (C) 2003-2006 Free Software Foundation, Inc.
-# 2007-2010, Flammie Pirinen <flammie@iki.fi>
+# 2007-2016, Flammie Pirinen <flammie@iki.fi>
#
-# Vimin kyttjt on nrttej. Sanasto on jargonia :-p
-#
-# Lhinn latin-1:t, sill vim pit portata ilmeisen obskuureille
-# alustoille. Mys: pluralit puuttuu, ohjelman kyttliittymn fontti
-# tasavlinen, tila rajattu, jne. jne., luovia ratkaisuja edess.
+# Jargonia ei ole yritetty suotta kotoperäistää missä teknisempi lainasanasto
+# tulee paremmin kyseeseen.
#
# Sanastosta:
-# Fold on sellainen moderneissa ohjelmointi-IDE:iss oleva toiminto, jolla
-# lohko koodia esim. funktio piilotetaan nkymst: suom. taitos alkup.
+# * Fold on sellainen moderneissa ohjelmointi-IDE:issä oleva toiminto, jolla
+# lohko koodia esim. funktio piilotetaan näkymästä: suom. taitos alkup.
# analogian mukaan
-# source v. lataa tiedoston, kuten bash-komento source (tai .)
+# * source, v. lataa tiedoston, kuten bash-komento source (tai .)
+# * dictionary (dict) on vaihtelevasti sanakirja tai tietorakenne
#
msgid ""
msgstr ""
"Project-Id-Version: Vim 7\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2014-05-26 14:21+0200\n"
-"PO-Revision-Date: 2010-08-09 02:35+0300\n"
-"Last-Translator: Flammie Pirinen <flammie@iki.fi>\n"
+"POT-Creation-Date: 2017-04-19 16:46+0200\n"
+"PO-Revision-Date: 2016-08-29 11:27+0200\n"
+"Last-Translator: Flammie A Pirinen <flammie@iki.fi>\n"
"Language-Team: Finnish <laatu@lokalisointi.org>\n"
"Language: fi\n"
"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=ISO-8859-1\n"
+"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-#: ../api/private/helpers.c:201
#, fuzzy
-msgid "Unable to get option value"
-msgstr "Roskaa argumentin perss"
+#~ msgid "Index out of bounds"
+#~ msgstr "ei löytynyt "
-#: ../api/private/helpers.c:204
-msgid "internal error: unknown option type"
-msgstr ""
+#, fuzzy
+#~ msgid "Line index is too high"
+#~ msgstr "ikkunan indeksi alueen ulkopuolella"
+
+#~ msgid "Argument \"start\" is higher than \"end\""
+#~ msgstr ""
+
+#~ msgid "All items in the replacement array must be strings"
+#~ msgstr ""
+
+msgid "string cannot contain newlines"
+msgstr "merkkijono ei saa sisältää rivinvaihtoja"
+
+#, fuzzy
+#~ msgid "Failed to save undo information"
+#~ msgstr "ei voitu tallentaa kumoustietoja"
+
+#, fuzzy
+#~ msgid "Failed to delete line"
+#~ msgstr "ei voitu poistaa riviä"
+
+#~ msgid "Index value is too high"
+#~ msgstr ""
+
+#, fuzzy
+#~ msgid "Failed to replace line"
+#~ msgstr "ei voitu korvata riviä"
+
+#, fuzzy
+#~ msgid "Failed to insert line"
+#~ msgstr "ei voitu lisätä riviä"
+
+#, fuzzy
+#~ msgid "Failed to rename buffer"
+#~ msgstr "ei voity uudelleennimetä puskuria"
+
+#, fuzzy
+#~ msgid "Mark name must be a single character"
+#~ msgstr "merkin nimen pitää olla yksi merkki"
+
+#, fuzzy
+#~ msgid "Invalid mark name"
+#~ msgstr "virheellinen merkin nimi"
+
+#, fuzzy
+#~ msgid "Line number outside range"
+#~ msgstr "rivinumero arvoalueen ulkopuolella"
+
+#, fuzzy
+#~ msgid "Column value outside range"
+#~ msgstr "rivinumero arvoalueen ulkopuolella"
+
+#, fuzzy
+#~ msgid "Keyboard interrupt"
+#~ msgstr "näppäimistökeskeytys"
+
+#, fuzzy
+#~ msgid "Key not found"
+#~ msgstr "ei löytynyt "
+
+#, fuzzy
+#~ msgid "Dictionary is locked"
+#~ msgstr "dictionary on lukittu"
+
+#, fuzzy
+#~ msgid "Empty variable names aren't allowed"
+#~ msgstr "tyhjiä avaimia ei voi käyttää"
+
+#, fuzzy
+#~ msgid "Key length is too high"
+#~ msgstr "Liian pitkä polku"
+
+#, c-format
+#~ msgid "Key is read-only: %s"
+#~ msgstr ""
+
+#, c-format
+#~ msgid "Key is fixed: %s"
+#~ msgstr ""
+
+#, fuzzy, c-format
+#~ msgid "Key is locked: %s"
+#~ msgstr "E741: Arvo on lukittu: %s"
+
+#. Doesn't exist, fail
+#, fuzzy, c-format
+#~ msgid "Key does not exist: %s"
+#~ msgstr "Tiedostoa %s ei ole"
+
+#, fuzzy
+#~ msgid "Empty option name"
+#~ msgstr "E792: tyhjä valikkonimi"
+
+#, fuzzy, c-format
+#~ msgid "Invalid option name \"%s\""
+#~ msgstr "E755: Virheellinen alue kohteelle %s"
+
+#, fuzzy, c-format
+#~ msgid "Unable to get value for option \"%s\""
+#~ msgstr "ei voi tyhjentää yleistä asetusta %s"
+
+#, fuzzy, c-format
+#~ msgid "Unknown type for option \"%s\""
+#~ msgstr "E113: Tuntematon asetus: %s"
+
+#, fuzzy, c-format
+#~ msgid "Unable to unset option \"%s\""
+#~ msgstr "ei voi tyhjentää yleistä asetusta %s"
+
+#, fuzzy, c-format
+#~ msgid "Cannot unset option \"%s\" because it doesn't have a global value"
+#~ msgstr "ei voi tyhjentää asetusta %s jolla ei ole yleistä arvoa"
+
+#, c-format
+#~ msgid "Option \"%s\" requires a boolean value"
+#~ msgstr ""
+
+#, fuzzy, c-format
+#~ msgid "Option \"%s\" requires an integer value"
+#~ msgstr "E709: [:] toimii vain listalla"
+
+#, c-format
+#~ msgid "Value for option \"%s\" is outside range"
+#~ msgstr ""
+
+#, fuzzy, c-format
+#~ msgid "Option \"%s\" requires a string value"
+#~ msgstr "E709: [:] toimii vain listalla"
+
+#, fuzzy
+#~ msgid "Invalid buffer id"
+#~ msgstr "virheellinen puskurinumero"
+
+#, fuzzy
+#~ msgid "Invalid window id"
+#~ msgstr "E534: Viallinen leveä fontti"
+
+#, fuzzy
+#~ msgid "Invalid tabpage id"
+#~ msgstr "Väärä argumentti valitsimelle"
+
+#~ msgid "Integer value outside range"
+#~ msgstr ""
+
+#, fuzzy
+#~ msgid "Empty dictionary keys aren't allowed"
+#~ msgstr "tyhjiä avaimia ei voi käyttää"
+
+#, fuzzy
+#~ msgid "Problem while switching windows"
+#~ msgstr "virhe ikkunaa vaihtaessa"
+
+#, fuzzy
+#~ msgid "UI already attached for channel"
+#~ msgstr "Vanhimmassa muutoksessa"
+
+#~ msgid "Expected width > 0 and height > 0"
+#~ msgstr ""
+
+#~ msgid "UI is not attached for channel"
+#~ msgstr ""
+
+#~ msgid "rgb must be a Boolean"
+#~ msgstr ""
+
+#~ msgid "popupmenu_external must be a Boolean"
+#~ msgstr ""
+
+#, fuzzy
+#~ msgid "No such ui option"
+#~ msgstr "E24: Lyhennettä ei ole"
+
+#~ msgid "Function called with too many arguments."
+#~ msgstr ""
+
+#~ msgid "Error calling function."
+#~ msgstr ""
+
+#, fuzzy
+#~ msgid "String length is too high"
+#~ msgstr "Liian pitkä polku"
+
+#~ msgid "Directory string is too long"
+#~ msgstr ""
+
+#, fuzzy
+#~ msgid "Failed to change directory"
+#~ msgstr "hakemistoa ei voitu muuttaa"
+
+#, fuzzy, c-format
+#~ msgid "Failed to switch to buffer %d"
+#~ msgstr "ei voitu vaihtaa puskuriin %d"
+
+#, fuzzy, c-format
+#~ msgid "Failed to switch to window %d"
+#~ msgstr "ei voitu vaihtaa puskuriin %d"
+
+#, fuzzy, c-format
+#~ msgid "Failed to switch to tabpage %d"
+#~ msgstr "ei voitu vaihtaa puskuriin %d"
+
+#~ msgid "All items in calls array must be arrays"
+#~ msgstr ""
+
+#~ msgid "All items in calls array must be arrays of size 2"
+#~ msgstr ""
+
+#~ msgid "name must be String"
+#~ msgstr ""
+
+#~ msgid "args must be Array"
+#~ msgstr ""
+
+# datarakenteita
+#, fuzzy
+#~ msgid "Argument \"pos\" must be a [row, col] array"
+#~ msgstr "E712: Argumentin %s pitää olla lista tai sanakirja"
+
+#, fuzzy
+#~ msgid "Cursor position outside buffer"
+#~ msgstr "kursorin sijainti puskurin ulkopuolella"
+
+#~ msgid "Height value outside range"
+#~ msgstr ""
+
+#~ msgid "Width value outside range"
+#~ msgstr ""
-#: ../buffer.c:92
msgid "[Location List]"
msgstr "[Sijaintiluettelo]"
-#: ../buffer.c:93
msgid "[Quickfix List]"
msgstr "[Pikakorjausluettelo]"
-#: ../buffer.c:94
-#, fuzzy
msgid "E855: Autocommands caused command to abort"
-msgstr "E812: Autocommands muutti puskurin tai sen nimen"
+msgstr "E855: Autocommands lopetti komennon"
-#: ../buffer.c:135
msgid "E82: Cannot allocate any buffer, exiting..."
-msgstr "E82: Mitn puskuria ei voitu varata, lopetetaan..."
+msgstr "E82: Mitään puskuria ei voitu varata, lopetetaan..."
-#: ../buffer.c:138
msgid "E83: Cannot allocate buffer, using other one..."
-msgstr "E83: Puskuria ei voitu varata, kytetn toista..."
+msgstr "E83: Puskuria ei voitu varata, käytetään toista..."
+
+#, fuzzy
+#~ msgid "E937: Attempt to delete a buffer that is in use"
+#~ msgstr "E934: Ei voida hypätä puskuriin jolla ei ole nimeä"
-#: ../buffer.c:763
msgid "E515: No buffers were unloaded"
msgstr "E515: Puskureita ei vapautettu"
-#: ../buffer.c:765
msgid "E516: No buffers were deleted"
msgstr "E516: Puskureita ei poistettu"
-#: ../buffer.c:767
msgid "E517: No buffers were wiped out"
msgstr "E517: Puskureita ei pyyhitty"
-#: ../buffer.c:772
msgid "1 buffer unloaded"
msgstr "1 puskuri vapautettiin"
-#: ../buffer.c:774
#, c-format
msgid "%d buffers unloaded"
msgstr "%d puskuria vapautettiin"
-#: ../buffer.c:777
msgid "1 buffer deleted"
msgstr "1 puskuri poistettu"
-#: ../buffer.c:779
#, c-format
msgid "%d buffers deleted"
msgstr "%d puskuria poistettu"
-#: ../buffer.c:782
msgid "1 buffer wiped out"
msgstr "1 puskuri pyyhitty"
-#: ../buffer.c:784
#, c-format
msgid "%d buffers wiped out"
msgstr "%d puskuria pyyhitty"
-#: ../buffer.c:806
msgid "E90: Cannot unload last buffer"
-msgstr "E90: Ei voi vapauttaa viimeist puskuria"
+msgstr "E90: Ei voi vapauttaa viimeistä puskuria"
-#: ../buffer.c:874
msgid "E84: No modified buffer found"
msgstr "E84: Ei muokattuja puskureita"
#. back where we started, didn't find anything.
-#: ../buffer.c:903
msgid "E85: There is no listed buffer"
msgstr "E85: Luetteloitua puskuria ei ole"
-#: ../buffer.c:913
-#, c-format
-msgid "E86: Buffer %<PRId64> does not exist"
-msgstr "E86: Puskuria %<PRId64> ei ole"
-
-#: ../buffer.c:915
msgid "E87: Cannot go beyond last buffer"
-msgstr "E87: Viimeisen puskurin ohi ei voi edet"
+msgstr "E87: Viimeisen puskurin ohi ei voi edetä"
-#: ../buffer.c:917
msgid "E88: Cannot go before first buffer"
-msgstr "E88: Ensimmisen puskurin ohi ei voi edet"
+msgstr "E88: Ensimmäisen puskurin ohi ei voi edetä"
-#: ../buffer.c:945
-#, c-format
+#, fuzzy, c-format
+#~ msgid "E89: %s will be killed(add ! to override)"
+#~ msgstr "E189: %s on jo olemassa (lisää komentoon ! ohittaaksesi)"
+
+#, fuzzy, c-format
msgid ""
"E89: No write since last change for buffer %<PRId64> (add ! to override)"
msgstr ""
-"E89: Puskurin %<PRId64> muutoksia ei ole tallennettu (lis komentoon ! "
+"E89: Puskurin %ld muutoksia ei ole tallennettu (lisää komentoon ! "
"ohittaaksesi)"
#. wrap around (may cause duplicates)
-#: ../buffer.c:1423
msgid "W14: Warning: List of file names overflow"
msgstr "W14: Varoitus: Tiedostonimiluettelon ylivuoto"
-#: ../buffer.c:1555 ../quickfix.c:3361
-#, c-format
-msgid "E92: Buffer %<PRId64> not found"
-msgstr "E92: Puskuria %<PRId64> ei lydy"
+#, fuzzy, c-format
+#~ msgid "E92: Buffer %<PRId64> not found"
+#~ msgstr "E92: Puskuria %ld ei löydy"
-#: ../buffer.c:1798
#, c-format
msgid "E93: More than one match for %s"
-msgstr "E93: %s tsm useampaan kuin yhteen puskuriin"
+msgstr "E93: %s täsmää useampaan kuin yhteen puskuriin"
-#: ../buffer.c:1800
#, c-format
msgid "E94: No matching buffer for %s"
-msgstr "E94: %s ei tsm yhteenkn puskuriin"
+msgstr "E94: %s ei täsmää yhteenkään puskuriin"
-#: ../buffer.c:2161
-#, c-format
-msgid "line %<PRId64>"
-msgstr "rivi %<PRId64>"
+#, fuzzy, c-format
+#~ msgid "line %<PRId64>"
+#~ msgstr "rivi %ld"
-#: ../buffer.c:2233
msgid "E95: Buffer with this name already exists"
msgstr "E95: Samanniminen puskuri on jo olemassa"
-#: ../buffer.c:2498
msgid " [Modified]"
msgstr " [Muokattu]"
-#: ../buffer.c:2501
msgid "[Not edited]"
msgstr "[Muokkaamaton]"
-#: ../buffer.c:2504
msgid "[New file]"
msgstr "[Uusi tiedosto]"
-#: ../buffer.c:2505
msgid "[Read errors]"
-msgstr "[Lukuvirheit]"
+msgstr "[Lukuvirheitä]"
-#: ../buffer.c:2506 ../buffer.c:3217 ../fileio.c:1807 ../screen.c:4895
msgid "[RO]"
msgstr "[Luku]"
-#: ../buffer.c:2507 ../fileio.c:1807
msgid "[readonly]"
msgstr "[kirjoitussuojattu]"
-#: ../buffer.c:2524
#, c-format
msgid "1 line --%d%%--"
msgstr "1 rivi --%d %%--"
-#: ../buffer.c:2526
-#, c-format
-msgid "%<PRId64> lines --%d%%--"
-msgstr "%<PRId64> rivi --%d %%--"
+#, fuzzy, c-format
+#~ msgid "%<PRId64> lines --%d%%--"
+#~ msgstr "%ld riviä --%d %%--"
-#: ../buffer.c:2530
-#, c-format
-msgid "line %<PRId64> of %<PRId64> --%d%%-- col "
-msgstr "rivi %<PRId64>/%<PRId64> --%d %%-- sarake "
+#, fuzzy, c-format
+#~ msgid "line %<PRId64> of %<PRId64> --%d%%-- col "
+#~ msgstr "rivi %ld/%ld --%d %%-- sarake "
-#: ../buffer.c:2632 ../buffer.c:4292 ../memline.c:1554
msgid "[No Name]"
-msgstr "[Nimetn]"
+msgstr "[Nimetön]"
#. must be a help buffer
-#: ../buffer.c:2667
msgid "help"
msgstr "ohje"
-#: ../buffer.c:3225 ../screen.c:4883
msgid "[Help]"
msgstr "[Ohje]"
-#: ../buffer.c:3254 ../screen.c:4887
msgid "[Preview]"
msgstr "[Esikatselu]"
# sijainti tiedostossa -indikaattoreja:
-# 4 merkki sais riitt
-#: ../buffer.c:3528
+# 4 merkkiä sais riittää
msgid "All"
msgstr "Kaik"
-#: ../buffer.c:3528
msgid "Bot"
msgstr "Loppu"
-#: ../buffer.c:3531
msgid "Top"
msgstr "Alku"
-#: ../buffer.c:4244
-msgid ""
-"\n"
-"# Buffer list:\n"
-msgstr ""
-"\n"
-"# Puskuriluettelo:\n"
-
-#: ../buffer.c:4289
msgid "[Scratch]"
msgstr "[Raapust]"
-#: ../buffer.c:4529
msgid ""
"\n"
"--- Signs ---"
@@ -249,795 +421,669 @@ msgstr ""
"\n"
"--- Merkit ---"
-#: ../buffer.c:4538
#, c-format
msgid "Signs for %s:"
msgstr "Merkit kohteelle %s:"
-#: ../buffer.c:4543
-#, c-format
-msgid " line=%<PRId64> id=%d name=%s"
-msgstr " rivi=%<PRId64> id=%d nimi=%s"
+#, fuzzy, c-format
+#~ msgid " line=%<PRId64> id=%d name=%s"
+#~ msgstr " rivi=%ld id=%d nimi=%s"
-#: ../cursor_shape.c:68
msgid "E545: Missing colon"
msgstr "E545: Kaksoispiste puuttuu"
-#: ../cursor_shape.c:70 ../cursor_shape.c:94
msgid "E546: Illegal mode"
msgstr "E546: Virheellinen tila"
-#: ../cursor_shape.c:134
msgid "E548: digit expected"
-msgstr "E548: pit olla numero"
+msgstr "E548: pitää olla numero"
-#: ../cursor_shape.c:138
msgid "E549: Illegal percentage"
msgstr "E549: Virheellinen prosenttiluku"
-#: ../diff.c:146
-#, c-format
-msgid "E96: Can not diff more than %<PRId64> buffers"
-msgstr "E96: Ei voi diffata enemp kuin %<PRId64> puskuria"
+#, fuzzy, c-format
+#~ msgid "E96: Cannot diff more than %<PRId64> buffers"
+#~ msgstr "E96: Ei voi diffata enempää kuin %ld puskuria"
-#: ../diff.c:753
msgid "E810: Cannot read or write temp files"
-msgstr "E810: Ei voi lukea tai kirjoittaa vliaikaistiedostoja"
+msgstr "E810: Ei voi lukea tai kirjoittaa väliaikaistiedostoja"
-#: ../diff.c:755
msgid "E97: Cannot create diffs"
-msgstr "E97: Ei voi luoda diffej"
+msgstr "E97: Ei voi luoda diffejä"
-#: ../diff.c:966
msgid "E816: Cannot read patch output"
msgstr "E816: Ei voi lukea patchin tulostetta"
-#: ../diff.c:1220
msgid "E98: Cannot read diff output"
msgstr "E98: Ei voi lukea diffin tulostetta"
-#: ../diff.c:2081
msgid "E99: Current buffer is not in diff mode"
-msgstr "E99: Tm puskuri ei ole diff-tilassa"
+msgstr "E99: Tämä puskuri ei ole diff-tilassa"
-#: ../diff.c:2100
msgid "E793: No other buffer in diff mode is modifiable"
-msgstr "E793: Yksikn muu diff-tilan puskurit ei ole muokattavissa"
+msgstr "E793: Yksikään muu diff-tilan puskurit ei ole muokattavissa"
-#: ../diff.c:2102
msgid "E100: No other buffer in diff mode"
-msgstr "E100: Yksikn muu puskuri ei ole diff-tilassa"
+msgstr "E100: Yksikään muu puskuri ei ole diff-tilassa"
-#: ../diff.c:2112
msgid "E101: More than two buffers in diff mode, don't know which one to use"
-msgstr "E101: Monta puskuria on diff-tilassa, kytettvn valinta ei onnistu"
+msgstr "E101: Monta puskuria on diff-tilassa, käytettävän valinta ei onnistu"
-#: ../diff.c:2141
#, c-format
msgid "E102: Can't find buffer \"%s\""
-msgstr "E102: Puskuria %s ei lydy"
+msgstr "E102: Puskuria %s ei löydy"
-#: ../diff.c:2152
#, c-format
msgid "E103: Buffer \"%s\" is not in diff mode"
msgstr "E103: Puskuri %s ei ole diff-tilassa"
-#: ../diff.c:2193
msgid "E787: Buffer changed unexpectedly"
msgstr "E787: Puskuri vaihtui odottamatta"
-#: ../digraph.c:1598
msgid "E104: Escape not allowed in digraph"
-msgstr "E104: Escapea ei voi kytt digraafissa"
+msgstr "E104: Escapea ei voi käyttää digraafissa"
-#: ../digraph.c:1760
msgid "E544: Keymap file not found"
-msgstr "E544: Nppinkarttaa ei lydy"
+msgstr "E544: Näppäinkarttaa ei löydy"
-#: ../digraph.c:1785
msgid "E105: Using :loadkeymap not in a sourced file"
-msgstr "E105: Kytetn :loadkeymapia ladatun tiedoston ulkopuolella"
+msgstr "E105: Käytetään :loadkeymapia ladatun tiedoston ulkopuolella"
-#: ../digraph.c:1821
msgid "E791: Empty keymap entry"
-msgstr "E791: Tyhj keymap-kentt"
+msgstr "E791: Tyhjä keymap-kenttä"
-#: ../edit.c:82
msgid " Keyword completion (^N^P)"
-msgstr " Avainsanatydennys (^N^P)"
+msgstr " Avainsanatäydennys (^N^P)"
#. ctrl_x_mode == 0, ^P/^N compl.
-#: ../edit.c:83
msgid " ^X mode (^]^D^E^F^I^K^L^N^O^Ps^U^V^Y)"
msgstr " ^X-tila (^]^D^E^F^I^K^L^N^O^Ps^U^V^Y)"
-#: ../edit.c:85
msgid " Whole line completion (^L^N^P)"
-msgstr " Tysrivitydennys (^L^N^P)"
+msgstr " Täysrivitäydennys (^L^N^P)"
-#: ../edit.c:86
msgid " File name completion (^F^N^P)"
-msgstr " Tiedostonimitydennys (^F^N^P)"
+msgstr " Tiedostonimitäydennys (^F^N^P)"
-#: ../edit.c:87
msgid " Tag completion (^]^N^P)"
-msgstr " Tgitydennys (^]^N^P)"
+msgstr " Tägitäydennys (^]^N^P)"
-#: ../edit.c:88
msgid " Path pattern completion (^N^P)"
-msgstr " Polkukuviotydennys (^N^P)"
+msgstr " Polkukuviotäydennys (^N^P)"
-#: ../edit.c:89
msgid " Definition completion (^D^N^P)"
-msgstr " Mritelmtydennys (^D^N^P)"
+msgstr " Määritelmätäydennys (^D^N^P)"
-#: ../edit.c:91
msgid " Dictionary completion (^K^N^P)"
-msgstr " Sanakirjatydennys (^K^N^P)"
+msgstr " Sanakirjatäydennys (^K^N^P)"
-#: ../edit.c:92
msgid " Thesaurus completion (^T^N^P)"
-msgstr " Thesaurus-tydennys (^T^N^P)"
+msgstr " Thesaurus-täydennys (^T^N^P)"
-#: ../edit.c:93
msgid " Command-line completion (^V^N^P)"
-msgstr " Komentorivitydennys (^V^N^P)"
+msgstr " Komentorivitäydennys (^V^N^P)"
-#: ../edit.c:94
msgid " User defined completion (^U^N^P)"
-msgstr " Kyttjn mrittelem tydennys (^U^N^P)"
+msgstr " Käyttäjän määrittelemä täydennys (^U^N^P)"
-#: ../edit.c:95
msgid " Omni completion (^O^N^P)"
-msgstr " Omnitydennys (^O^N^P)"
+msgstr " Omnitäydennys (^O^N^P)"
-#: ../edit.c:96
msgid " Spelling suggestion (s^N^P)"
msgstr " Oikaisulukuehdotus (s^N^P)"
-#: ../edit.c:97
msgid " Keyword Local completion (^N^P)"
-msgstr " Avainsanan paikallinen tydennys (^N^P)"
+msgstr " Avainsanan paikallinen täydennys (^N^P)"
-#: ../edit.c:100
msgid "Hit end of paragraph"
msgstr "Kappaleen loppu tuli vastaan"
-#: ../edit.c:101
-#, fuzzy
msgid "E839: Completion function changed window"
-msgstr "E813: Ei voi sulkea autocmd-ikkunaa"
+msgstr "E839: Täydennys vaihtoi ikkunaa"
-#: ../edit.c:102
msgid "E840: Completion function deleted text"
-msgstr ""
+msgstr "E840: Täydennys poisti tekstiä"
-#: ../edit.c:1847
msgid "'dictionary' option is empty"
-msgstr "dictionary-asetus on tyhj"
+msgstr "dictionary-asetus on tyhjä"
-#: ../edit.c:1848
msgid "'thesaurus' option is empty"
-msgstr "thesaurus-asetus on tyhj"
+msgstr "thesaurus-asetus on tyhjä"
-#: ../edit.c:2655
#, c-format
msgid "Scanning dictionary: %s"
msgstr "Luetaan sanakirjaa: %s"
-#: ../edit.c:3079
msgid " (insert) Scroll (^E/^Y)"
-msgstr " (sytt) Vieritys (^E/^Y)"
+msgstr " (syöttö) Vieritys (^E/^Y)"
-#: ../edit.c:3081
msgid " (replace) Scroll (^E/^Y)"
msgstr " (korvaus) Vieritys (^E/^Y)"
-#: ../edit.c:3587
#, c-format
msgid "Scanning: %s"
msgstr "Luetaan: %s"
-#: ../edit.c:3614
msgid "Scanning tags."
-msgstr "Luetaan tgej."
+msgstr "Luetaan tägejä."
-#: ../edit.c:4519
msgid " Adding"
-msgstr " Listn"
+msgstr " Lisätään"
#. showmode might reset the internal line pointers, so it must
#. * be called before line = ml_get(), or when this address is no
#. * longer needed. -- Acevedo.
#.
-#: ../edit.c:4562
msgid "-- Searching..."
msgstr "-- Haetaan..."
-#: ../edit.c:4618
msgid "Back at original"
-msgstr "Takaisin lhtpisteess"
+msgstr "Takaisin lähtöpisteessä"
-#: ../edit.c:4621
msgid "Word from other line"
-msgstr "Sana toisella rivill"
+msgstr "Sana toisella rivillä"
-#: ../edit.c:4624
msgid "The only match"
-msgstr "Ainoa tsmys"
+msgstr "Ainoa täsmäys"
-#: ../edit.c:4680
#, c-format
msgid "match %d of %d"
-msgstr "tsmys %d/%d"
+msgstr "täsmäys %d/%d"
-#: ../edit.c:4684
#, c-format
msgid "match %d"
-msgstr "tsmys %d"
+msgstr "täsmäys %d"
-#: ../eval.c:137
msgid "E18: Unexpected characters in :let"
-msgstr "E18: Odottamattomia merkkej komennossa :let"
-
-#: ../eval.c:138
-#, c-format
-msgid "E684: list index out of range: %<PRId64>"
-msgstr "E684: Indeksi %<PRId64> luettelon rajojen ulkopuolella"
+msgstr "E18: Odottamattomia merkkejä komennossa :let"
-#: ../eval.c:139
-#, c-format
-msgid "E121: Undefined variable: %s"
-msgstr "E121: Mrittelemtn muuttuja: %s"
-
-#: ../eval.c:140
msgid "E111: Missing ']'"
msgstr "E111: ] puuttuu"
-#: ../eval.c:141
#, c-format
msgid "E686: Argument of %s must be a List"
-msgstr "E686: Argumentin %s pit olla lista"
+msgstr "E686: Argumentin %s pitää olla lista"
# datarakenteita
-#: ../eval.c:143
#, c-format
msgid "E712: Argument of %s must be a List or Dictionary"
-msgstr "E712: Argumentin %s pit olla lista tai sanakirja"
-
-#: ../eval.c:144
-msgid "E713: Cannot use empty key for Dictionary"
-msgstr "E713: Sanakirjassa ei voi olla tyhji avaimia"
+msgstr "E712: Argumentin %s pitää olla lista tai sanakirja"
-#: ../eval.c:145
msgid "E714: List required"
msgstr "E714: Lista tarvitaan"
-#: ../eval.c:146
msgid "E715: Dictionary required"
msgstr "E715: Sanakirja tarvitaan"
-#: ../eval.c:147
+msgid "E928: String required"
+msgstr "E928: Merkkijono puuttuu"
+
#, c-format
msgid "E118: Too many arguments for function: %s"
msgstr "E118: Liikaa argumentteja funktiolle: %s"
-#: ../eval.c:148
#, c-format
msgid "E716: Key not present in Dictionary: %s"
msgstr "E716: Avainta %s ei ole sanakirjassa"
-#: ../eval.c:150
#, c-format
msgid "E122: Function %s already exists, add ! to replace it"
-msgstr "E122: Funktio %s on jo olemassa, lis ! korvataksesi"
+msgstr "E122: Funktio %s on jo olemassa, lisää ! korvataksesi"
-#: ../eval.c:151
msgid "E717: Dictionary entry already exists"
msgstr "E717: Sanakirja-alkio on jo olemassa"
-#: ../eval.c:152
msgid "E718: Funcref required"
msgstr "E718: Funcref tarvitaan"
-#: ../eval.c:153
msgid "E719: Cannot use [:] with a Dictionary"
-msgstr "E719: Sanakirjassa ei voi kytt merkint [:]"
+msgstr "E719: Sanakirjassa ei voi käyttää merkintää [:]"
-#: ../eval.c:154
-#, c-format
-msgid "E734: Wrong variable type for %s="
-msgstr "E734: Vr muuttujatyyppi muuttujalle %s="
-
-#: ../eval.c:155
#, c-format
msgid "E130: Unknown function: %s"
msgstr "E130: Tuntematon funktio: %s"
-#: ../eval.c:156
#, c-format
msgid "E461: Illegal variable name: %s"
msgstr "E461: Virheellinen muuttujanimi: %s"
-#: ../eval.c:157
-msgid "E806: using Float as a String"
-msgstr "E806: Float ei ky merkkijonosta"
+#, fuzzy, c-format
+#~ msgid "E46: Cannot change read-only variable \"%.*s\""
+#~ msgstr "E46: Kirjoitussuojattua muuttujaa %s ei voi muuttaa"
+
+#. TODO(ZyX-I): move to eval/executor
+#, c-format
+msgid "E734: Wrong variable type for %s="
+msgstr "E734: Väärä muuttujatyyppi muuttujalle %s="
-#: ../eval.c:1830
msgid "E687: Less targets than List items"
-msgstr "E687: Kohteita on vhemmn kuin listan alkioita"
+msgstr "E687: Kohteita on vähemmän kuin listan alkioita"
-#: ../eval.c:1834
msgid "E688: More targets than List items"
-msgstr "E688: Kohteita on enemmn kuin listan alkioita"
+msgstr "E688: Kohteita on enemmän kuin listan alkioita"
-#: ../eval.c:1906
msgid "Double ; in list of variables"
-msgstr "Kaksi ;:tt listan muuttujissa"
+msgstr "Kaksi ;:ttä listan muuttujissa"
-#: ../eval.c:2078
#, c-format
msgid "E738: Can't list variables for %s"
msgstr "E738: Kohteen %s muuttujia ei voi listata"
-#: ../eval.c:2391
+#, fuzzy, c-format
+#~ msgid "E121: Undefined variable: %.*s"
+#~ msgstr "E121: Määrittelemätön muuttuja: %s"
+
msgid "E689: Can only index a List or Dictionary"
-msgstr "E689: Vain listalla ja sanakirjalla voi olla indeksej"
+msgstr "E689: Vain listalla ja sanakirjalla voi olla indeksejä"
-#: ../eval.c:2396
msgid "E708: [:] must come last"
-msgstr "E708: [:]:n pit olla viimeisen"
+msgstr "E708: [:]:n pitää olla viimeisenä"
+
+#, fuzzy
+#~ msgid "E713: Cannot use empty key after ."
+#~ msgstr "E713: Sanakirjassa ei voi olla tyhjiä avaimia"
-#: ../eval.c:2439
msgid "E709: [:] requires a List value"
msgstr "E709: [:] toimii vain listalla"
-#: ../eval.c:2674
msgid "E710: List value has more items than target"
-msgstr "E710: Listalla on enemmn alkioita kuin kohteella"
+msgstr "E710: Listalla on enemmän alkioita kuin kohteella"
-#: ../eval.c:2678
msgid "E711: List value has not enough items"
msgstr "E711: Listalla ei ole tarpeeksi alkioita"
-#: ../eval.c:2867
msgid "E690: Missing \"in\" after :for"
msgstr "E690: :for-kommenolta puuttuu in"
-#: ../eval.c:3063
#, c-format
msgid "E107: Missing parentheses: %s"
msgstr "E107: Sulkeita puuttuu: %s"
-#: ../eval.c:3263
#, c-format
msgid "E108: No such variable: \"%s\""
msgstr "E108: Muuttujaa %s ei ole"
-#: ../eval.c:3333
-msgid "E743: variable nested too deep for (un)lock"
-msgstr "E743: muuttujassa liian monta tasoa lukituksen ksittelyyn"
+#. For historical reasons this error is not given for Lists and
+#. Dictionaries. E.g. b: dictionary may be locked/unlocked.
+#, fuzzy, c-format
+#~ msgid "E940: Cannot lock or unlock variable %s"
+#~ msgstr "E46: Kirjoitussuojattua muuttujaa %s ei voi muuttaa"
-#: ../eval.c:3630
msgid "E109: Missing ':' after '?'"
-msgstr "E109: ?:n jlkeen puuttuu :"
+msgstr "E109: ?:n jälkeen puuttuu :"
-#: ../eval.c:3893
msgid "E691: Can only compare List with List"
msgstr "E691: Listaa voi verrata vain listaan"
-#: ../eval.c:3895
-msgid "E692: Invalid operation for Lists"
+msgid "E692: Invalid operation for List"
msgstr "E692: Virheellinen toiminto listalle"
-#: ../eval.c:3915
msgid "E735: Can only compare Dictionary with Dictionary"
msgstr "E735: Sanakirjaa voi verrata vain sanakirjaan"
-#: ../eval.c:3917
msgid "E736: Invalid operation for Dictionary"
msgstr "E736: Virheellinen toiminto sanakirjalle"
-#: ../eval.c:3932
-msgid "E693: Can only compare Funcref with Funcref"
-msgstr "E693: Funcrefi voi verrata vain funcrefiin"
-
-#: ../eval.c:3934
msgid "E694: Invalid operation for Funcrefs"
msgstr "E694: Virheellinen toiminto funcrefille"
-#: ../eval.c:4277
msgid "E804: Cannot use '%' with Float"
-msgstr "E804: Ei voi kytt '%':a Floatin kanssa"
+msgstr "E804: Ei voi käyttää '%':a Floatin kanssa"
-#: ../eval.c:4478
msgid "E110: Missing ')'"
msgstr "E110: ) puuttuu"
-#: ../eval.c:4609
msgid "E695: Cannot index a Funcref"
-msgstr "E695: Funcrefi ei voi indeksoida"
+msgstr "E695: Funcrefiä ei voi indeksoida"
+
+msgid "E909: Cannot index a special variable"
+msgstr "E909: erikoismuuttujaa ei voi indeksoida"
-#: ../eval.c:4839
#, c-format
msgid "E112: Option name missing: %s"
msgstr "E112: Asetuksen nimi puuttuu: %s"
-#: ../eval.c:4855
#, c-format
msgid "E113: Unknown option: %s"
msgstr "E113: Tuntematon asetus: %s"
-#: ../eval.c:4904
#, c-format
msgid "E114: Missing quote: %s"
msgstr "E114: Puuttuva lainausmerkki: %s"
-#: ../eval.c:5020
#, c-format
msgid "E115: Missing quote: %s"
msgstr "E115: Puuttuva lainausmerkki: %s"
-#: ../eval.c:5084
#, c-format
msgid "E696: Missing comma in List: %s"
msgstr "E696: Listasta puuttuu pilkku: %s"
-#: ../eval.c:5091
#, c-format
msgid "E697: Missing end of List ']': %s"
msgstr "E697: Listan lopusta puuttuu ]: %s"
-#: ../eval.c:6475
+msgid "Not enough memory to set references, garbage collection aborted!"
+msgstr ""
+"Ei tarpeeksi muistia viitteiden asettamista varten, roskiekeruu peruttiin."
+
#, c-format
msgid "E720: Missing colon in Dictionary: %s"
msgstr "E720: Sanakirjasta puuttuu kaksoispiste: %s"
-#: ../eval.c:6499
#, c-format
msgid "E721: Duplicate key in Dictionary: \"%s\""
msgstr "E721: Kaksi samaa avainta sanakirjassa: %s"
-#: ../eval.c:6517
#, c-format
msgid "E722: Missing comma in Dictionary: %s"
msgstr "E722: Sanakirjasta puuttuu pilkku: %s"
-#: ../eval.c:6524
#, c-format
msgid "E723: Missing end of Dictionary '}': %s"
msgstr "E723: Sanakirjan lopusta puuttuu }: %s"
-#: ../eval.c:6555
-msgid "E724: variable nested too deep for displaying"
-msgstr "E724: muuttuja on upotettu liian syvlle nytettvksi"
+#, c-format
+msgid "E125: Illegal argument: %s"
+msgstr "E125: Virheellinen argumentti: %s"
+
+#, c-format
+msgid "E853: Duplicate argument name: %s"
+msgstr "E853: Kaksoiskappale argumentin nimestä: %s"
-#: ../eval.c:7188
#, c-format
msgid "E740: Too many arguments for function %s"
msgstr "E740: Liikaa argumentteja funktiolle %s"
-#: ../eval.c:7190
#, c-format
msgid "E116: Invalid arguments for function %s"
-msgstr "E116: Vri argumentteja funktiolle %s"
+msgstr "E116: Vääriä argumentteja funktiolle %s"
-#: ../eval.c:7377
#, c-format
msgid "E117: Unknown function: %s"
msgstr "E117: Tuntematon funktio: %s"
-#: ../eval.c:7383
+#, c-format
+msgid "E933: Function was deleted: %s"
+msgstr "E933: Funktion nimi poistettu: %s"
+
#, c-format
msgid "E119: Not enough arguments for function: %s"
msgstr "E119: Liikaa argumentteja funktiolle %s"
-#: ../eval.c:7387
#, c-format
msgid "E120: Using <SID> not in a script context: %s"
msgstr "E120: <SID> skriptin ulkopuolella: %s"
-#: ../eval.c:7391
#, c-format
msgid "E725: Calling dict function without Dictionary: %s"
msgstr "E725: dict-funktio ilman sanakirjaa: %s"
-#: ../eval.c:7453
-msgid "E808: Number or Float required"
-msgstr "E808: Number tai Float vaaditaan"
+#, fuzzy, c-format
+#~ msgid "Error converting the call result: %s"
+#~ msgstr "virhe Schemestä Vimiin konversiossa"
-#: ../eval.c:7503
-#, fuzzy
msgid "add() argument"
-msgstr "-c-argumentti"
+msgstr "add()-argumentti"
-#: ../eval.c:7907
msgid "E699: Too many arguments"
msgstr "E699: Liikaa argumentteja"
-#: ../eval.c:8073
msgid "E785: complete() can only be used in Insert mode"
-msgstr "E785: complete() toimii vain sytttilassa"
+msgstr "E785: complete() toimii vain syöttötilassa"
-#: ../eval.c:8156
msgid "&Ok"
msgstr "&Ok"
-#: ../eval.c:8676
-#, c-format
-msgid "E737: Key already exists: %s"
-msgstr "E737: Avain on jo olemassa: %s"
-
-#: ../eval.c:8692
#, fuzzy
+#~ msgid "dictwatcheradd() argument"
+#~ msgstr "add()-argumentti"
+
msgid "extend() argument"
-msgstr "--cmd-argumentti"
+msgstr "extend()-argumentti"
-#: ../eval.c:8915
-#, fuzzy
msgid "map() argument"
-msgstr "-c-argumentti"
+msgstr "map()-argumentti"
-#: ../eval.c:8916
-#, fuzzy
msgid "filter() argument"
-msgstr "-c-argumentti"
+msgstr "filter()-argumentti"
-#: ../eval.c:9229
-#, c-format
-msgid "+-%s%3ld lines: "
-msgstr "+-%s%3ld rivi: "
+#, fuzzy, c-format
+#~ msgid "+-%s%3ld lines: "
+#~ msgstr "+-%s%3ld rivi: "
-#: ../eval.c:9291
#, c-format
msgid "E700: Unknown function: %s"
msgstr "E700: Tuntematon funktio: %s"
-#: ../eval.c:10729
+msgid "E922: expected a dict"
+msgstr "E922: odotettiin dictiä"
+
+# datarakenteita
+msgid "E923: Second argument of function() must be a list or a dict"
+msgstr "E923: toisen function()-argumentin pitää olla lista tai sanakirja"
+
+#, fuzzy
+#~ msgid "E5000: Cannot find tab number."
+#~ msgstr "E695: Funcrefiä ei voi indeksoida"
+
+#~ msgid "E5001: Higher scope cannot be -1 if lower scope is >= 0."
+#~ msgstr ""
+
+#, fuzzy
+#~ msgid "E5002: Cannot find window number."
+#~ msgstr "E671: Ikkunan otsikkoa ei löydy %s"
+
msgid "called inputrestore() more often than inputsave()"
msgstr "inputrestore() suoritettu useammin kuin inputsave()"
-#: ../eval.c:10771
-#, fuzzy
msgid "insert() argument"
-msgstr "-c-argumentti"
+msgstr "insert()-argumentti"
-#: ../eval.c:10841
msgid "E786: Range not allowed"
-msgstr "E786: Aluetta ei voi kytt"
+msgstr "E786: Aluetta ei voi käyttää"
+
+#~ msgid "Invalid stream on rpc job, use jobclose(id, 'rpc')"
+#~ msgstr ""
+
+#~ msgid "Invalid job stream: Not an rpc job"
+#~ msgstr ""
+
+#, c-format
+#~ msgid "Invalid job stream \"%s\""
+#~ msgstr ""
+
+#~ msgid "Can't send data to the job: stdin is closed"
+#~ msgstr ""
+
+#~ msgid "Can't send raw data to rpc channel"
+#~ msgstr ""
+
+#, fuzzy
+#~ msgid "E474: Failed to convert list to string"
+#~ msgstr "ei voitu konvertoida tyypistä %s vim-listaksi"
+
+#, fuzzy, c-format
+#~ msgid "E474: Failed to parse %.*s"
+#~ msgstr "E241: Kohteeseen %s lähettäminen ei onnistunut"
-#: ../eval.c:11140
msgid "E701: Invalid type for len()"
msgstr "E701: Virheellinen tyyppi funktiolle len()"
-#: ../eval.c:11980
+#, fuzzy, c-format
+#~ msgid "msgpackdump() argument, index %i"
+#~ msgstr "map()-argumentti"
+
+#, fuzzy
+#~ msgid "E5070: Character number must not be less than zero"
+#~ msgstr "luvun on oltava nollaa suurempi"
+
+#, fuzzy, c-format
+#~ msgid "E5071: Character number must not be greater than INT_MAX (%i)"
+#~ msgstr "luvun on oltava nollaa suurempi"
+
msgid "E726: Stride is zero"
msgstr "E726: Stride on nolla"
-#: ../eval.c:11982
msgid "E727: Start past end"
-msgstr "E727: Alku on lopun jlkeen"
+msgstr "E727: Alku on lopun jälkeen"
-#: ../eval.c:12024 ../eval.c:15297
msgid "<empty>"
-msgstr "<tyhj>"
+msgstr "<tyhjä>"
-#: ../eval.c:12282
-#, fuzzy
msgid "remove() argument"
-msgstr "--cmd-argumentti"
+msgstr "remove()-argumentti"
-#: ../eval.c:12466
msgid "E655: Too many symbolic links (cycle?)"
-msgstr "E655: Liikaa symbolisia linkkej (mahdollinen sykli)"
+msgstr "E655: Liikaa symbolisia linkkejä (mahdollinen sykli)"
-#: ../eval.c:12593
-#, fuzzy
msgid "reverse() argument"
-msgstr "-c-argumentti"
+msgstr "reverse()-argumentti"
+
+#, c-format
+msgid "E927: Invalid action: '%s'"
+msgstr "E927: Viallinen toiminto: %s"
-#: ../eval.c:13721
-#, fuzzy
msgid "sort() argument"
-msgstr "-c-argumentti"
+msgstr "sort()-argumentti"
-#: ../eval.c:13721
-#, fuzzy
msgid "uniq() argument"
-msgstr "-c-argumentti"
+msgstr "uniq()-argumentti"
-#: ../eval.c:13776
msgid "E702: Sort compare function failed"
msgstr "E702: Lajittelun vertausfunktio ei onnistunut"
-#: ../eval.c:13806
-#, fuzzy
msgid "E882: Uniq compare function failed"
-msgstr "E702: Lajittelun vertausfunktio ei onnistunut"
+msgstr "E882: Uniqin vertausfunktio ei onnistunut"
-#: ../eval.c:14085
msgid "(Invalid)"
msgstr "(Virheellinen)"
-#: ../eval.c:14590
-msgid "E677: Error writing temp file"
-msgstr "E677: Vliaikaistiedostoon kirjoittaminen ei onnistunut"
+#, c-format
+msgid "E935: invalid submatch number: %d"
+msgstr "E935: Virheellinen alitäsmäyksen numero: %d"
-#: ../eval.c:16159
-msgid "E805: Using a Float as a Number"
-msgstr "E805: Float ei ky Numberista"
+#~ msgid "Can only call this function in an unmodified buffer"
+#~ msgstr ""
-#: ../eval.c:16162
-msgid "E703: Using a Funcref as a Number"
-msgstr "E703: Funcref ei ky Numberista"
+msgid "E921: Invalid callback argument"
+msgstr "E921: Virheellinen callback-argumentti"
-#: ../eval.c:16170
-msgid "E745: Using a List as a Number"
-msgstr "E745: Lista ei ky Numberista"
+#, fuzzy, c-format
+#~ msgid "E80: Error while writing: %s"
+#~ msgstr "E80: Kirjoitusvirhe"
-#: ../eval.c:16173
-msgid "E728: Using a Dictionary as a Number"
-msgstr "E728: Sanakirja ei ky Numberista"
+#. Using %s, p and not %c, *p to preserve multibyte characters
+#, fuzzy, c-format
+#~ msgid "E5060: Unknown flag: %s"
+#~ msgstr "E235: Tuntematon fontti: %s"
-#: ../eval.c:16259
-msgid "E729: using Funcref as a String"
-msgstr "E729: Funcref ei ky merkkijonosta"
+#, fuzzy
+#~ msgid "E482: Can't open file with an empty name"
+#~ msgstr "E212: Tiedoston avaus kirjoittamista varten ei onnistu"
-#: ../eval.c:16262
-msgid "E730: using List as a String"
-msgstr "E730: Lista ei ky merkkijonosta"
+#, fuzzy, c-format
+#~ msgid "E482: Can't open file %s for writing: %s"
+#~ msgstr "E212: Tiedoston avaus kirjoittamista varten ei onnistu"
-#: ../eval.c:16265
-msgid "E731: using Dictionary as a String"
-msgstr "E731: Sanakirja ei ky merkkijonosta"
+#, fuzzy, c-format
+#~ msgid "E80: Error when closing file %s: %s"
+#~ msgstr "E209: Virhe suljettaessa tiedostoa %s"
-#: ../eval.c:16619
-#, c-format
-msgid "E706: Variable type mismatch for: %s"
-msgstr "E706: Muuttujatyyppi ei tsm: %s"
+#, fuzzy, c-format
+#~ msgid "E794: Cannot set variable in the sandbox: \"%.*s\""
+#~ msgstr "E794: Muuttujaa ei voi asettaa hiekkalaatikossa: %s"
-#: ../eval.c:16705
-#, c-format
-msgid "E795: Cannot delete variable %s"
-msgstr "E795: Muuttujaa %s ei voi poistaa"
+#, fuzzy, c-format
+#~ msgid "E795: Cannot delete variable %.*s"
+#~ msgstr "E795: Muuttujaa %s ei voi poistaa"
-#: ../eval.c:16724
#, c-format
msgid "E704: Funcref variable name must start with a capital: %s"
-msgstr "E704: Funcrefin muuttujanimen pit alkaa suuraakkosella: %s"
+msgstr "E704: Funcrefin muuttujanimen pitää alkaa suuraakkosella: %s"
-#: ../eval.c:16732
#, c-format
msgid "E705: Variable name conflicts with existing function: %s"
msgstr "E705: Muuttujanimi on sama kuin olemassaolevan funktion: %s"
-#: ../eval.c:16763
-#, c-format
-msgid "E741: Value is locked: %s"
-msgstr "E741: Arvo on lukittu: %s"
-
-#: ../eval.c:16764 ../eval.c:16769 ../message.c:1839
-msgid "Unknown"
-msgstr "Tuntematon"
-
-#: ../eval.c:16768
-#, c-format
-msgid "E742: Cannot change value of %s"
-msgstr "E742: Ei voi muuttaa muuttujan %s arvoa"
-
-#: ../eval.c:16838
msgid "E698: variable nested too deep for making a copy"
-msgstr "E698: muuttuja on upotettu liian syvlle kopioitavaksi"
+msgstr "E698: muuttuja on upotettu liian syvälle kopioitavaksi"
-#: ../eval.c:17249
#, c-format
msgid "E123: Undefined function: %s"
msgstr "E123: Tuntematon funktio: %s"
-#: ../eval.c:17260
#, c-format
msgid "E124: Missing '(': %s"
msgstr "E124: ( puuttuu: %s"
-#: ../eval.c:17293
-#, fuzzy
msgid "E862: Cannot use g: here"
-msgstr "E284: Ei voi asettaa IC-arvoja"
+msgstr "E862: g: ei toimi täällä"
-#: ../eval.c:17312
-#, c-format
-msgid "E125: Illegal argument: %s"
-msgstr "E125: Virheellinen argumentti: %s"
-
-#: ../eval.c:17323
#, fuzzy, c-format
-msgid "E853: Duplicate argument name: %s"
-msgstr "Kaksoiskappale kentn nimest: %s"
+#~ msgid "E932: Closure function should not be at top level: %s"
+#~ msgstr "E932 Sulkeumafunktio ei voi olla uloimmalla tasolla: %s"
-#: ../eval.c:17416
msgid "E126: Missing :endfunction"
msgstr "E126: :endfunction puuttuu"
-#: ../eval.c:17537
#, c-format
msgid "E707: Function name conflicts with variable: %s"
msgstr "E707: Funktion nimi on ristiriidassa muuttujan kanssa: %s"
-#: ../eval.c:17549
#, c-format
msgid "E127: Cannot redefine function %s: It is in use"
-msgstr "E127: Funktiota %s ei voi mritell uudestaan, koska se on kytss"
+msgstr "E127: Funktiota %s ei voi määritellä uudestaan, koska se on käytössä"
-#: ../eval.c:17604
#, c-format
msgid "E746: Function name does not match script file name: %s"
msgstr "E746: Funktion nimi ei ole sama kuin skriptin tiedostonnimi: %s"
-#: ../eval.c:17716
msgid "E129: Function name required"
msgstr "E129: Funktion nimi puuttuu"
-#: ../eval.c:17824
-#, fuzzy, c-format
+#, c-format
msgid "E128: Function name must start with a capital or \"s:\": %s"
-msgstr ""
-"E128: Funktion nimen pit alkaa suuraakkosella tai sislt kaksoispisteen: "
-"%s"
+msgstr "E128: Funktion nimen pitää alkaa suuraakkosella tai merkeillä ’s:’: %s"
-#: ../eval.c:17833
-#, fuzzy, c-format
+#, c-format
msgid "E884: Function name cannot contain a colon: %s"
-msgstr ""
-"E128: Funktion nimen pit alkaa suuraakkosella tai sislt kaksoispisteen: "
-"%s"
+msgstr "E884: Funktion nimessä ei saa olla kaksoispistettä: %s"
-#: ../eval.c:18336
#, c-format
msgid "E131: Cannot delete function %s: It is in use"
msgstr "E131: Funktiota %s ei voi poistaa"
-#: ../eval.c:18441
+#, fuzzy, c-format
+#~ msgid "Cannot delete function %s: It is being used internally"
+#~ msgstr "E131: Funktiota %s ei voi poistaa"
+
msgid "E132: Function call depth is higher than 'maxfuncdepth'"
-msgstr "E132: Funktiokutsujen syvyys on enemmn kuin maxfuncdepth"
+msgstr "E132: Funktiokutsujen syvyys on enemmän kuin maxfuncdepth"
-#: ../eval.c:18568
#, c-format
msgid "calling %s"
msgstr "kutsutaan funktiota %s"
-#: ../eval.c:18651
#, c-format
msgid "%s aborted"
msgstr "%s keskeytettiin"
-#: ../eval.c:18653
-#, c-format
-msgid "%s returning #%<PRId64>"
-msgstr "%s palaa kohdassa #%<PRId64>"
+#, fuzzy, c-format
+#~ msgid "%s returning #%<PRId64>"
+#~ msgstr "%s palaa kohdassa #%ld"
-#: ../eval.c:18670
#, c-format
msgid "%s returning %s"
msgstr "%s palaa kohdassa %s"
-#: ../eval.c:18691 ../ex_cmds2.c:2695
#, c-format
msgid "continuing in %s"
msgstr "jatkaa kohdassa %s"
-#: ../eval.c:18795
msgid "E133: :return not inside a function"
-msgstr "E133: :return ei ole funktion sisll"
+msgstr "E133: :return ei ole funktion sisällä"
-#: ../eval.c:19159
-msgid ""
-"\n"
-"# global variables:\n"
-msgstr ""
-"\n"
-"# globaalit muuttujat:\n"
-
-#: ../eval.c:19254
msgid ""
"\n"
"\tLast set from "
@@ -1045,154 +1091,396 @@ msgstr ""
"\n"
"\tViimeksi asetettu kohteesta "
-#: ../eval.c:19272
msgid "No old files"
msgstr "Ei vanhoja tiedostoja"
-# puhutaan merkin ulkoasusta snprintf(..., c, c, c, c)
-#: ../ex_cmds.c:122
#, c-format
-msgid "<%s>%s%s %d, Hex %02x, Octal %03o"
-msgstr "<%s>%s%s %d, heksana %02x, oktaalina %03o"
+#~ msgid "E474: Expected comma before list item: %s"
+#~ msgstr ""
-#: ../ex_cmds.c:145
#, c-format
-msgid "> %d, Hex %04x, Octal %o"
-msgstr "> %d, heksana %04x, oktaalina %o"
+#~ msgid "E474: Expected colon before dictionary value: %s"
+#~ msgstr ""
+
+#, fuzzy, c-format
+#~ msgid "E474: Expected string key: %s"
+#~ msgstr "E415: odotuksenvastainen =-merkki: %s"
+
+#, fuzzy, c-format
+#~ msgid "E474: Expected comma before dictionary key: %s"
+#~ msgstr "E722: Sanakirjasta puuttuu pilkku: %s"
+
+#, fuzzy, c-format
+#~ msgid "E474: Unfinished escape sequence: %.*s"
+#~ msgstr "E540: Sulkematon lausekesarja"
-#: ../ex_cmds.c:146
#, c-format
-msgid "> %d, Hex %08x, Octal %o"
-msgstr "> %d, hekdana %08x, oktaalina %o"
+#~ msgid "E474: Unfinished unicode escape sequence: %.*s"
+#~ msgstr ""
-#: ../ex_cmds.c:684
-msgid "E134: Move lines into themselves"
-msgstr "E134: Rivien siirto itsejens plle"
+#, c-format
+#~ msgid "E474: Expected four hex digits after \\u: %.*s"
+#~ msgstr ""
-#: ../ex_cmds.c:747
-msgid "1 line moved"
-msgstr "1 rivi siirretty"
+#, fuzzy, c-format
+#~ msgid "E474: Unknown escape sequence: %.*s"
+#~ msgstr "E409: Tuntematon ryhmän nimi: %s"
-#: ../ex_cmds.c:749
#, c-format
-msgid "%<PRId64> lines moved"
-msgstr "%<PRId64> rivi siirretty"
+#~ msgid "E474: ASCII control characters cannot be present inside string: %.*s"
+#~ msgstr ""
-#: ../ex_cmds.c:1175
#, c-format
-msgid "%<PRId64> lines filtered"
-msgstr "%<PRId64> rivi suodatettu"
+#~ msgid "E474: Only UTF-8 strings allowed: %.*s"
+#~ msgstr ""
-#: ../ex_cmds.c:1194
-msgid "E135: *Filter* Autocommands must not change current buffer"
-msgstr "E135: *Filter*-autocommand ei voi vaihtaa puskuria"
+#, c-format
+#~ msgid ""
+#~ "E474: Only UTF-8 code points up to U+10FFFF are allowed to appear unescaped: "
+#~ "%.*s"
+#~ msgstr ""
-#: ../ex_cmds.c:1244
-msgid "[No write since last change]\n"
-msgstr "[Viimeisint muutosta ei ole kirjoitettu]\n"
+#, fuzzy, c-format
+#~ msgid "E474: Expected string end: %.*s"
+#~ msgstr "E415: odotuksenvastainen =-merkki: %s"
+
+#, fuzzy, c-format
+#~ msgid "E474: Leading zeroes are not allowed: %.*s"
+#~ msgstr "E786: Aluetta ei voi käyttää"
+
+#, fuzzy, c-format
+#~ msgid "E474: Missing number after minus sign: %.*s"
+#~ msgstr "E526: Lukuarvo puuttuu merkkijonon <%s> jälkeen"
+
+#, fuzzy, c-format
+#~ msgid "E474: Missing number after decimal dot: %.*s"
+#~ msgstr "E526: Lukuarvo puuttuu merkkijonon <%s> jälkeen"
+
+#, fuzzy, c-format
+#~ msgid "E474: Missing exponent: %.*s"
+#~ msgstr "E114: Puuttuva lainausmerkki: %s"
-#: ../ex_cmds.c:1424
#, c-format
-msgid "%sviminfo: %s in line: "
-msgstr "%sviminfo: %s rivill: "
+#~ msgid ""
+#~ "E685: internal error: while converting number \"%.*s\" to float string2float "
+#~ "consumed %zu bytes in place of %zu"
+#~ msgstr ""
-#: ../ex_cmds.c:1431
-msgid "E136: viminfo: Too many errors, skipping rest of file"
-msgstr "E136: viminfo: liikaa virheit, ohitetaan lopputiedosto"
+#, c-format
+#~ msgid ""
+#~ "E685: internal error: while converting number \"%.*s\" to integer vim_str2nr "
+#~ "consumed %i bytes in place of %zu"
+#~ msgstr ""
+
+#~ msgid "E474: Attempt to decode a blank string"
+#~ msgstr ""
-#: ../ex_cmds.c:1458
#, c-format
-msgid "Reading viminfo file \"%s\"%s%s%s"
-msgstr "Luetaan viminfo-tiedostoa \"%s\"%s%s%s"
+#~ msgid "E474: No container to close: %.*s"
+#~ msgstr ""
-#: ../ex_cmds.c:1460
-msgid " info"
-msgstr " info"
+#, c-format
+#~ msgid "E474: Closing list with curly bracket: %.*s"
+#~ msgstr ""
-#: ../ex_cmds.c:1461
-msgid " marks"
-msgstr " merkit"
+#, fuzzy, c-format
+#~ msgid "E474: Closing dictionary with square bracket: %.*s"
+#~ msgstr "E725: dict-funktio ilman sanakirjaa: %s"
-#: ../ex_cmds.c:1462
-msgid " oldfiles"
-msgstr " vanhaatiedostoa"
+#, fuzzy, c-format
+#~ msgid "E474: Trailing comma: %.*s"
+#~ msgstr "E488: Ylimääräisiä merkkejä perässä"
-#: ../ex_cmds.c:1463
-msgid " FAILED"
-msgstr " EPONNISTUI"
+#, c-format
+#~ msgid "E474: Expected value after colon: %.*s"
+#~ msgstr ""
+
+#, fuzzy, c-format
+#~ msgid "E474: Expected value: %.*s"
+#~ msgstr "E415: odotuksenvastainen =-merkki: %s"
-#. avoid a wait_return for this message, it's annoying
-#: ../ex_cmds.c:1541
#, c-format
-msgid "E137: Viminfo file is not writable: %s"
-msgstr "E137: Viminfo-tiedostoon ei voitu kirjoittaa: %s"
+#~ msgid "E474: Comma not inside container: %.*s"
+#~ msgstr ""
+
+#, fuzzy, c-format
+#~ msgid "E474: Duplicate comma: %.*s"
+#~ msgstr "E721: Kaksi samaa avainta sanakirjassa: %s"
+
+#, fuzzy, c-format
+#~ msgid "E474: Comma after colon: %.*s"
+#~ msgstr "E254: Väriä %s ei voi määritellä"
+
+#, fuzzy, c-format
+#~ msgid "E474: Using comma in place of colon: %.*s"
+#~ msgstr "E722: Sanakirjasta puuttuu pilkku: %s"
-#: ../ex_cmds.c:1626
#, c-format
-msgid "E138: Can't write viminfo file %s!"
-msgstr "E138: Viminfo-tiedoston kirjoittaminen ei onnistu %s"
+#~ msgid "E474: Leading comma: %.*s"
+#~ msgstr ""
-#: ../ex_cmds.c:1635
#, c-format
-msgid "Writing viminfo file \"%s\""
-msgstr "Kirjoitetaan viminfo-tiedostoa %s"
+#~ msgid "E474: Colon not inside container: %.*s"
+#~ msgstr ""
+
+#, fuzzy, c-format
+#~ msgid "E474: Using colon not in dictionary: %.*s"
+#~ msgstr "E720: Sanakirjasta puuttuu kaksoispiste: %s"
+
+#, fuzzy, c-format
+#~ msgid "E474: Unexpected colon: %.*s"
+#~ msgstr "E415: odotuksenvastainen =-merkki: %s"
-#. Write the info:
-#: ../ex_cmds.c:1720
#, c-format
-msgid "# This viminfo file was generated by Vim %s.\n"
-msgstr "# Vimin %s generoima viminfo-tiedosto.\n"
+#~ msgid "E474: Colon after comma: %.*s"
+#~ msgstr ""
-#: ../ex_cmds.c:1722
-msgid ""
-"# You may edit it if you're careful!\n"
-"\n"
-msgstr ""
-"# Muokkaa varovasti!\n"
-"\n"
+#, fuzzy, c-format
+#~ msgid "E474: Duplicate colon: %.*s"
+#~ msgstr "E721: Kaksi samaa avainta sanakirjassa: %s"
+
+#, fuzzy, c-format
+#~ msgid "E474: Expected null: %.*s"
+#~ msgstr "E415: odotuksenvastainen =-merkki: %s"
+
+#, fuzzy, c-format
+#~ msgid "E474: Expected true: %.*s"
+#~ msgstr "E270: odotuksenvastainen redo"
+
+#, fuzzy, c-format
+#~ msgid "E474: Expected false: %.*s"
+#~ msgstr "E415: odotuksenvastainen =-merkki: %s"
-#: ../ex_cmds.c:1723
-msgid "# Value of 'encoding' when this file was written\n"
-msgstr "# encoding-muuttujan arvo tiedostoa kirjoitettaessa\n"
+#, fuzzy, c-format
+#~ msgid "E474: Unidentified byte: %.*s"
+#~ msgstr "E121: Määrittelemätön muuttuja: %s"
-#: ../ex_cmds.c:1800
-msgid "Illegal starting char"
-msgstr "Virheellinen aloitusmerkki"
+#, fuzzy, c-format
+#~ msgid "E474: Trailing characters: %.*s"
+#~ msgstr "E488: Ylimääräisiä merkkejä perässä"
+
+#, fuzzy, c-format
+#~ msgid "E474: Unexpected end of input: %.*s"
+#~ msgstr "E415: odotuksenvastainen =-merkki: %s"
+
+#, c-format
+#~ msgid "key %s"
+#~ msgstr ""
+
+#, c-format
+#~ msgid "key %s at index %i from special map"
+#~ msgstr ""
+
+#, c-format
+#~ msgid "index %i"
+#~ msgstr ""
+
+#~ msgid "partial"
+#~ msgstr ""
+
+#, fuzzy, c-format
+#~ msgid "argument %i"
+#~ msgstr "-c-argumentti"
+
+#, fuzzy
+#~ msgid "partial self dictionary"
+#~ msgstr "ei voida muuttaa kiinnitettyä sanakirjaa"
+
+#~ msgid "itself"
+#~ msgstr ""
+
+#. Only give this message once for a recursive call to avoid
+#. flooding the user with errors.
+#~ msgid "E724: unable to correctly dump variable with self-referencing container"
+#~ msgstr ""
+
+#~ msgid "E474: Unable to represent NaN value in JSON"
+#~ msgstr ""
+
+#~ msgid "E474: Unable to represent infinity in JSON"
+#~ msgstr ""
+
+#, c-format
+#~ msgid ""
+#~ "E474: String \"%.*s\" contains byte that does not start any UTF-8 character"
+#~ msgstr ""
+
+#, c-format
+#~ msgid ""
+#~ "E474: UTF-8 string contains code point which belongs to a surrogate pair: "
+#~ "%.*s"
+#~ msgstr ""
+
+#, fuzzy
+#~ msgid "E474: Unable to convert EXT string to JSON"
+#~ msgstr "E620: Tulostuskoodaukseen %s muunto ei onnistu"
+
+#, c-format
+#~ msgid "E474: Error while dumping %s, %s: attempt to dump function reference"
+#~ msgstr ""
+
+#, fuzzy
+#~ msgid "E474: Invalid key in special dictionary"
+#~ msgstr "E736: Virheellinen toiminto sanakirjalle"
+
+#, c-format
+#~ msgid "E5004: Error while dumping %s, %s: attempt to dump function reference"
+#~ msgstr ""
+
+#, c-format
+#~ msgid "E5005: Unable to dump %s: container references itself in %s"
+#~ msgstr ""
+
+#, fuzzy, c-format
+#~ msgid "E684: list index out of range: %<PRId64>"
+#~ msgstr "E684: Indeksi %ld luettelon rajojen ulkopuolella"
+
+#~ msgid "E6000: Argument is not a function or function name"
+#~ msgstr ""
+
+#, c-format
+msgid "E737: Key already exists: %s"
+msgstr "E737: Avain on jo olemassa: %s"
+
+#, fuzzy
+#~ msgid "tv_clear() argument"
+#~ msgstr "filter()-argumentti"
+
+msgid "E743: variable nested too deep for (un)lock"
+msgstr "E743: muuttujassa liian monta tasoa lukituksen käsittelyyn"
+
+#, fuzzy, c-format
+#~ msgid "E741: Value is locked: %.*s"
+#~ msgstr "E741: Arvo on lukittu: %s"
+
+#, fuzzy, c-format
+#~ msgid "E742: Cannot change value of %.*s"
+#~ msgstr "E742: Ei voi muuttaa muuttujan %s arvoa"
+
+msgid "Unknown"
+msgstr "Tuntematon"
+
+#, fuzzy
+#~ msgid "E805: Expected a Number or a String, Float found"
+#~ msgstr "E807: Odotettiin Float-argumenttia printf():lle"
+
+#~ msgid "E703: Expected a Number or a String, Funcref found"
+#~ msgstr ""
+
+#, fuzzy
+#~ msgid "E745: Expected a Number or a String, List found"
+#~ msgstr "E807: Odotettiin Float-argumenttia printf():lle"
+
+#~ msgid "E728: Expected a Number or a String, Dictionary found"
+#~ msgstr ""
+
+#, fuzzy
+#~ msgid "E5300: Expected a Number or a String"
+#~ msgstr "E807: Odotettiin Float-argumenttia printf():lle"
+
+msgid "E745: Using a List as a Number"
+msgstr "E745: Lista ei käy Numberista"
+
+msgid "E728: Using a Dictionary as a Number"
+msgstr "E728: Sanakirja ei käy Numberista"
+
+msgid "E805: Using a Float as a Number"
+msgstr "E805: Float ei käy Numberista"
+
+#, fuzzy
+#~ msgid "E685: using an invalid value as a Number"
+#~ msgstr "E908: huono arvo merkkijonolle"
+
+msgid "E730: using List as a String"
+msgstr "E730: Lista ei käy merkkijonosta"
+
+msgid "E731: using Dictionary as a String"
+msgstr "E731: Sanakirja ei käy merkkijonosta"
+
+msgid "E908: using an invalid value as a String"
+msgstr "E908: huono arvo merkkijonolle"
+
+msgid "E891: Using a Funcref as a Float"
+msgstr "E891: Funcref ei käy Floatista"
+
+msgid "E892: Using a String as a Float"
+msgstr "E892: String ei käy Floatista"
+
+msgid "E893: Using a List as a Float"
+msgstr "E893: Lista ei käy Floatista"
+
+msgid "E894: Using a Dictionary as a Float"
+msgstr "E894: Sanakirja ei käy Floatista"
+
+msgid "E907: Using a special value as a Float"
+msgstr "E907: Käytettiin erikoisarvoa Floattina"
+
+msgid "E808: Number or Float required"
+msgstr "E808: Number tai Float vaaditaan"
+
+# puhutaan merkin ulkoasusta snprintf(..., c, c, c, c)
+#, c-format
+msgid "<%s>%s%s %d, Hex %02x, Octal %03o"
+msgstr "<%s>%s%s %d, heksana %02x, oktaalina %03o"
+
+#, c-format
+msgid "> %d, Hex %04x, Octal %o"
+msgstr "> %d, heksana %04x, oktaalina %o"
+
+#, c-format
+msgid "> %d, Hex %08x, Octal %o"
+msgstr "> %d, hekdana %08x, oktaalina %o"
+
+msgid "E134: Move lines into themselves"
+msgstr "E134: Rivien siirto itsejensä päälle"
+
+msgid "1 line moved"
+msgstr "1 rivi siirretty"
+
+#, fuzzy, c-format
+#~ msgid "%<PRId64> lines moved"
+#~ msgstr "%ld riviä siirretty"
+
+#, c-format
+msgid "E482: Can't create file %s"
+msgstr "E482: Tiedostoa %s ei voi luoda"
+
+#, fuzzy, c-format
+#~ msgid "%<PRId64> lines filtered"
+#~ msgstr "%ld riviä suodatettu"
+
+msgid "E135: *Filter* Autocommands must not change current buffer"
+msgstr "E135: *Filter*-autocommand ei voi vaihtaa puskuria"
+
+msgid "[No write since last change]\n"
+msgstr "[Viimeisintä muutosta ei ole kirjoitettu]\n"
-#: ../ex_cmds.c:2162
msgid "Write partial file?"
msgstr "Kirjoita osittainen tiedosto"
-#: ../ex_cmds.c:2166
msgid "E140: Use ! to write partial buffer"
-msgstr "E140: Kyt !-komentoa osittaisen puskurin kirjoittamiseen"
+msgstr "E140: Käytä !-komentoa osittaisen puskurin kirjoittamiseen"
-#: ../ex_cmds.c:2281
#, c-format
msgid "Overwrite existing file \"%s\"?"
msgstr "Ylikirjoitetaanko olemassaoleva tiedosto %s?"
-#: ../ex_cmds.c:2317
#, c-format
msgid "Swap file \"%s\" exists, overwrite anyway?"
msgstr "Swap-tiedosto %s on olemassa, ylikirjoitetaanko?"
-#: ../ex_cmds.c:2326
#, c-format
msgid "E768: Swap file exists: %s (:silent! overrides)"
msgstr "E768: Swap-tiedosto on jo olemassa: %s (komento :silent! ohittaa)"
-#: ../ex_cmds.c:2381
-#, c-format
-msgid "E141: No file name for buffer %<PRId64>"
-msgstr "E141: Ei tiedostonime puskurille %<PRId64>"
+#, fuzzy, c-format
+#~ msgid "E141: No file name for buffer %<PRId64>"
+#~ msgstr "E141: Ei tiedostonimeä puskurille %ld"
-#: ../ex_cmds.c:2412
msgid "E142: File not written: Writing is disabled by 'write' option"
msgstr ""
-"E142: Tiedostoa ei kirjoitettu; write-asetus poistaa kirjoituksen kytst"
+"E142: Tiedostoa ei kirjoitettu; write-asetus poistaa kirjoituksen käytöstä"
-#: ../ex_cmds.c:2434
#, c-format
msgid ""
"'readonly' option is set for \"%s\".\n"
@@ -1201,7 +1489,6 @@ msgstr ""
"readonly asetettu tiedostolle \"%s\".\n"
"Kirjoitetaanko?"
-#: ../ex_cmds.c:2439
#, c-format
msgid ""
"File permissions of \"%s\" are read-only.\n"
@@ -1210,799 +1497,599 @@ msgid ""
msgstr ""
"Tiedosto %s on kirjoitussuojattu.\n"
"Siihen saattaa voida silti kirjoittaa.\n"
-"Yritetnk?"
+"Yritetäänkö?"
-#: ../ex_cmds.c:2451
#, c-format
msgid "E505: \"%s\" is read-only (add ! to override)"
-msgstr "E505: %s on kirjoitussuojattu (lis komentoon ! ohittaaksesi)"
+msgstr "E505: %s on kirjoitussuojattu (lisää komentoon ! ohittaaksesi)"
-#: ../ex_cmds.c:3120
#, c-format
msgid "E143: Autocommands unexpectedly deleted new buffer %s"
msgstr "E143: Autocommand poisti uuden puskurin odotuksen vastaisesti %s"
-#: ../ex_cmds.c:3313
msgid "E144: non-numeric argument to :z"
msgstr "E144: :z:n argumentti ei ole numero"
-#: ../ex_cmds.c:3404
-msgid "E145: Shell commands not allowed in rvim"
-msgstr "E145: Kuoren komennot eivt toimi rvimiss"
+#, fuzzy
+#~ msgid "E145: Shell commands not allowed in restricted mode"
+#~ msgstr "E145: Kuoren komennot eivät toimi rvimissä"
-#: ../ex_cmds.c:3498
msgid "E146: Regular expressions can't be delimited by letters"
-msgstr "E146: Snnllist ilmausta ei voi rajata kirjaimilla"
+msgstr "E146: Säännöllistä ilmausta ei voi rajata kirjaimilla"
-#: ../ex_cmds.c:3964
#, c-format
msgid "replace with %s (y/n/a/q/l/^E/^Y)?"
msgstr "korvaa kohteella %s (y/n/a/q/l/^E/^Y)?"
-#: ../ex_cmds.c:4379
msgid "(Interrupted) "
msgstr "(Keskeytetty)"
-#: ../ex_cmds.c:4384
msgid "1 match"
-msgstr "1 tsmys"
+msgstr "1 täsmäys"
-#: ../ex_cmds.c:4384
msgid "1 substitution"
msgstr "1 korvaus"
-#: ../ex_cmds.c:4387
-#, c-format
-msgid "%<PRId64> matches"
-msgstr "%<PRId64> tsmyst"
+#, fuzzy, c-format
+#~ msgid "%<PRId64> matches"
+#~ msgstr "%ld täsmäystä"
-#: ../ex_cmds.c:4388
-#, c-format
-msgid "%<PRId64> substitutions"
-msgstr "%<PRId64> korvausta"
+#, fuzzy, c-format
+#~ msgid "%<PRId64> substitutions"
+#~ msgstr "%ld korvausta"
-#: ../ex_cmds.c:4392
msgid " on 1 line"
-msgstr " 1 rivill"
+msgstr " 1 rivillä"
-#: ../ex_cmds.c:4395
-#, c-format
-msgid " on %<PRId64> lines"
-msgstr " %<PRId64> rivill"
+#, fuzzy, c-format
+#~ msgid " on %<PRId64> lines"
+#~ msgstr " %ld rivillä"
-#: ../ex_cmds.c:4438
msgid "E147: Cannot do :global recursive"
msgstr "E147: :globalia ei voi suorittaa rekursiivisesti"
-#: ../ex_cmds.c:4467
msgid "E148: Regular expression missing from global"
-msgstr "E148: Snnllinen ilmaus puuttuu globaalista"
+msgstr "E148: Säännöllinen ilmaus puuttuu globaalista"
-#: ../ex_cmds.c:4508
#, c-format
msgid "Pattern found in every line: %s"
-msgstr "Kuvio lytyi joka rivilt: %s"
+msgstr "Kuvio löytyi joka riviltä: %s"
-#: ../ex_cmds.c:4510
-#, fuzzy, c-format
+#, c-format
msgid "Pattern not found: %s"
-msgstr "Kuviota ei lydy"
-
-#: ../ex_cmds.c:4587
-msgid ""
-"\n"
-"# Last Substitute String:\n"
-"$"
-msgstr ""
-"\n"
-"# Viimeisin korvausmerkkijono:\n"
-"$"
+msgstr "Kuviota ei löydy: %s"
-#: ../ex_cmds.c:4679
msgid "E478: Don't panic!"
-msgstr "E478: l panikoi."
+msgstr "E478: Älä panikoi."
-#: ../ex_cmds.c:4717
#, c-format
msgid "E661: Sorry, no '%s' help for %s"
-msgstr "E661: Sori, ei lydy %s-ohjetta kohteelle %s"
+msgstr "E661: ei löydy %s-ohjetta kohteelle %s"
-#: ../ex_cmds.c:4719
#, c-format
msgid "E149: Sorry, no help for %s"
-msgstr "E149: Sori, ei lydy ohjetta kohteelle %s"
+msgstr "E149: ei löydy ohjetta kohteelle %s"
-#: ../ex_cmds.c:4751
#, c-format
msgid "Sorry, help file \"%s\" not found"
-msgstr "Sori, ohjetiedostoa %s ei lydy"
+msgstr "ohjetiedostoa %s ei löydy"
-#: ../ex_cmds.c:5323
-#, c-format
-msgid "E150: Not a directory: %s"
-msgstr "E150: Ei ole hakemisto: %s"
-
-#: ../ex_cmds.c:5446
#, c-format
msgid "E152: Cannot open %s for writing"
msgstr "E152: Ei voi avata tiedostoa %s kirjoittamista varten"
-#: ../ex_cmds.c:5471
#, c-format
msgid "E153: Unable to open %s for reading"
msgstr "E153: Ei voi avata tiedostoa %s lukemista varten"
-#: ../ex_cmds.c:5500
#, c-format
msgid "E670: Mix of help file encodings within a language: %s"
-msgstr "E670: Monia ohjetiedostokoodauksia kieless: %s"
+msgstr "E670: Monia ohjetiedostokoodauksia kielessä: %s"
-#: ../ex_cmds.c:5565
#, c-format
msgid "E154: Duplicate tag \"%s\" in file %s/%s"
-msgstr "E154: Kaksoiskappale tgist %s tiedostossa %s/%s"
+msgstr "E154: Kaksoiskappale tägistä %s tiedostossa %s/%s"
+
+#, c-format
+msgid "E150: Not a directory: %s"
+msgstr "E150: Ei ole hakemisto: %s"
-#: ../ex_cmds.c:5687
#, c-format
msgid "E160: Unknown sign command: %s"
msgstr "E160: Tuntematon merkkikomento: %s"
-#: ../ex_cmds.c:5704
msgid "E156: Missing sign name"
msgstr "E156: Merkki puuttuu"
-#: ../ex_cmds.c:5746
msgid "E612: Too many signs defined"
-msgstr "E612: Liikaa merkkej mritelty"
+msgstr "E612: Liikaa merkkejä määritelty"
-#: ../ex_cmds.c:5813
#, c-format
msgid "E239: Invalid sign text: %s"
msgstr "E239: Virheellinen merkkiteksti: %s"
-#: ../ex_cmds.c:5844 ../ex_cmds.c:6035
#, c-format
msgid "E155: Unknown sign: %s"
msgstr "E155: Tuntematon merkki: %s"
-#: ../ex_cmds.c:5877
msgid "E159: Missing sign number"
msgstr "E159: Merkin numero puuttuu"
-#: ../ex_cmds.c:5971
#, c-format
msgid "E158: Invalid buffer name: %s"
msgstr "E158: Virheellinen puskurin nimi: %s"
-#: ../ex_cmds.c:6008
+msgid "E934: Cannot jump to a buffer that does not have a name"
+msgstr "E934: Ei voida hypätä puskuriin jolla ei ole nimeä"
+
+#, fuzzy, c-format
+#~ msgid "E157: Invalid sign ID: %<PRId64>"
+#~ msgstr "E157: Virheellinen merkin tunnus: %ld"
+
#, c-format
-msgid "E157: Invalid sign ID: %<PRId64>"
-msgstr "E157: Virheellinen merkin tunnus: %<PRId64>"
+msgid "E885: Not possible to change sign %s"
+msgstr "E885: Ei voida muuttaa merkkiä %s"
-#: ../ex_cmds.c:6066
msgid " (not supported)"
msgstr " (ei tuettu)"
-#: ../ex_cmds.c:6169
msgid "[Deleted]"
msgstr "[Poistettu]"
-#: ../ex_cmds2.c:139
msgid "Entering Debug mode. Type \"cont\" to continue."
-msgstr "Siirrytn vianetsinttilaan, kirjoita cont jatkaaksesi."
+msgstr "Siirrytään vianetsintätilaan, kirjoita cont jatkaaksesi."
-#: ../ex_cmds2.c:143 ../ex_docmd.c:759
-#, c-format
-msgid "line %<PRId64>: %s"
-msgstr "rivi %<PRId64>: %s"
+#, fuzzy, c-format
+#~ msgid "line %<PRId64>: %s"
+#~ msgstr "rivi %ld: %s"
-#: ../ex_cmds2.c:145
#, c-format
msgid "cmd: %s"
msgstr "kmnt: %s"
-#: ../ex_cmds2.c:322
+msgid "frame is zero"
+msgstr "kehys on nolla"
+
#, c-format
-msgid "Breakpoint in \"%s%s\" line %<PRId64>"
-msgstr "Katkaisukohta %s%s rivill %<PRId64>"
+msgid "frame at highest level: %d"
+msgstr "kehys ylimmällä tasolla: %d"
+
+#, fuzzy, c-format
+#~ msgid "Breakpoint in \"%s%s\" line %<PRId64>"
+#~ msgstr "Katkaisukohta %s%s rivillä %ld"
-#: ../ex_cmds2.c:581
#, c-format
msgid "E161: Breakpoint not found: %s"
msgstr "E161: Katkaisukohta puuttuu: %s"
-#: ../ex_cmds2.c:611
msgid "No breakpoints defined"
msgstr "Ei katkaisukohtia"
-#: ../ex_cmds2.c:617
-#, c-format
-msgid "%3d %s %s line %<PRId64>"
-msgstr "%3d %s %s rivi %<PRId64>"
+#, fuzzy, c-format
+#~ msgid "%3d %s %s line %<PRId64>"
+#~ msgstr "%3d %s %s rivi %ld"
-#: ../ex_cmds2.c:942
msgid "E750: First use \":profile start {fname}\""
-msgstr "E750: Aloita kskyll :profile start {fname}"
+msgstr "E750: Aloita käskyllä :profile start {fname}"
-#: ../ex_cmds2.c:1269
#, c-format
msgid "Save changes to \"%s\"?"
msgstr "Tallennetaanko muutokset tiedostoon %s?"
-#: ../ex_cmds2.c:1271 ../ex_docmd.c:8851
msgid "Untitled"
-msgstr "Nimetn"
+msgstr "Nimetön"
-#: ../ex_cmds2.c:1421
#, c-format
msgid "E162: No write since last change for buffer \"%s\""
-msgstr "E162: Muutoksia ei ole kirjoitettu puskurin %s viime muutoksen jlkeen"
+msgstr "E162: Muutoksia ei ole kirjoitettu puskurin %s viime muutoksen jälkeen"
-#: ../ex_cmds2.c:1480
msgid "Warning: Entered other buffer unexpectedly (check autocommands)"
msgstr "Varoitus: Puskuri vaihtui odottamatta (tarkista autocommands)"
-#: ../ex_cmds2.c:1826
msgid "E163: There is only one file to edit"
msgstr "E163: Vain yksi tiedosto muokattavana"
-#: ../ex_cmds2.c:1828
msgid "E164: Cannot go before first file"
-msgstr "E164: Ensimmisen tiedoston ohi ei voi menn"
+msgstr "E164: Ensimmäisen tiedoston ohi ei voi mennä"
-#: ../ex_cmds2.c:1830
msgid "E165: Cannot go beyond last file"
-msgstr "E165: Viimeisen tiedoston ohi ei voi menn"
+msgstr "E165: Viimeisen tiedoston ohi ei voi mennä"
-#: ../ex_cmds2.c:2175
#, c-format
msgid "E666: compiler not supported: %s"
-msgstr "E666: kntj ei tueta: %s"
+msgstr "E666: kääntäjää ei tueta: %s"
-#: ../ex_cmds2.c:2257
#, c-format
msgid "Searching for \"%s\" in \"%s\""
-msgstr "Etsitn ilmausta %s kohteesta %s"
+msgstr "Etsitään ilmausta %s kohteesta %s"
-#: ../ex_cmds2.c:2284
#, c-format
msgid "Searching for \"%s\""
-msgstr "Etsitn ilmausta %s"
+msgstr "Etsitään ilmausta %s"
-#: ../ex_cmds2.c:2307
#, c-format
-msgid "not found in 'runtimepath': \"%s\""
-msgstr "ei lydy runtimepathista: %s"
+msgid "not found in '%s': \"%s\""
+msgstr "'%s' ei löydy kohteesta: %s"
-#: ../ex_cmds2.c:2472
#, c-format
msgid "Cannot source a directory: \"%s\""
msgstr "Hakemistoa ei voi ladata: %s"
-#: ../ex_cmds2.c:2518
#, c-format
msgid "could not source \"%s\""
msgstr "ei voitu ladata %s"
-#: ../ex_cmds2.c:2520
-#, c-format
-msgid "line %<PRId64>: could not source \"%s\""
-msgstr "rivi %<PRId64>: ei voitu ladata %s"
+#, fuzzy, c-format
+#~ msgid "line %<PRId64>: could not source \"%s\""
+#~ msgstr "rivi %ld: ei voitu ladata %s"
-#: ../ex_cmds2.c:2535
#, c-format
msgid "sourcing \"%s\""
msgstr "ladataan %s"
-#: ../ex_cmds2.c:2537
-#, c-format
-msgid "line %<PRId64>: sourcing \"%s\""
-msgstr "rivi %<PRId64>: ladataan %s"
+#, fuzzy, c-format
+#~ msgid "line %<PRId64>: sourcing \"%s\""
+#~ msgstr "rivi %ld: ladataan %s"
-#: ../ex_cmds2.c:2693
#, c-format
msgid "finished sourcing %s"
msgstr "ladattu %s"
-#: ../ex_cmds2.c:2765
msgid "modeline"
msgstr "mode-rivi"
-#: ../ex_cmds2.c:2767
msgid "--cmd argument"
msgstr "--cmd-argumentti"
-#: ../ex_cmds2.c:2769
msgid "-c argument"
msgstr "-c-argumentti"
-#: ../ex_cmds2.c:2771
msgid "environment variable"
-msgstr "ympristmuuttuja"
+msgstr "ympäristömuuttuja"
-#: ../ex_cmds2.c:2773
msgid "error handler"
-msgstr "virheksittelin"
+msgstr "virhekäsittelin"
-#: ../ex_cmds2.c:3020
msgid "W15: Warning: Wrong line separator, ^M may be missing"
-msgstr "W15: Varoitus: Vr rivierotin, ^M saattaa puuttua"
+msgstr "W15: Varoitus: Väärä rivierotin, ^M saattaa puuttua"
-#: ../ex_cmds2.c:3139
msgid "E167: :scriptencoding used outside of a sourced file"
msgstr "E167: :scriptencoding ladatun tiedoston ulkopuolella"
-#: ../ex_cmds2.c:3166
msgid "E168: :finish used outside of a sourced file"
msgstr "E168: :finish ladatun tiedoston ulkopuolella"
-#: ../ex_cmds2.c:3389
#, c-format
msgid "Current %slanguage: \"%s\""
-msgstr "Kytss oleva %skieli: %s"
+msgstr "Käytössä oleva %skieli: %s"
-#: ../ex_cmds2.c:3404
#, c-format
msgid "E197: Cannot set language to \"%s\""
-msgstr "E197: Kieleksi ei voitu asettaa kielt %s"
+msgstr "E197: Kieleksi ei voitu asettaa kieltä %s"
#. don't redisplay the window
#. don't wait for return
-#: ../ex_docmd.c:387
msgid "Entering Ex mode. Type \"visual\" to go to Normal mode."
-msgstr "Siirrytn Ex-tilaan, kirjoita visual palataksesi normaaliin tilaan."
+msgstr "Siirrytään Ex-tilaan, kirjoita visual palataksesi normaaliin tilaan."
-#: ../ex_docmd.c:428
msgid "E501: At end-of-file"
msgstr "E501: Tiedoston lopussa"
-#: ../ex_docmd.c:513
msgid "E169: Command too recursive"
msgstr "E169: Liian rekursiivinen komento"
-#: ../ex_docmd.c:1006
+#, fuzzy
+#~ msgid "line %"
+#~ msgstr "rivi %ld"
+
#, c-format
msgid "E605: Exception not caught: %s"
msgstr "E605: Kiinniottamaton poikkeus: %s"
-#: ../ex_docmd.c:1085
msgid "End of sourced file"
msgstr "Ladatun tiedoston loppu"
-#: ../ex_docmd.c:1086
msgid "End of function"
msgstr "Funktion loppu"
-#: ../ex_docmd.c:1628
msgid "E464: Ambiguous use of user-defined command"
-msgstr "E464: Kyttjn mrittelemn komennon monimerkityksinen kytt"
+msgstr "E464: Käyttäjän määrittelemän komennon monimerkityksinen käyttö"
-#: ../ex_docmd.c:1638
msgid "E492: Not an editor command"
msgstr "E492: Ei ole editorikomento"
-#: ../ex_docmd.c:1729
msgid "E493: Backwards range given"
msgstr "E493: Takaperoinen arvoalue annettu"
-#: ../ex_docmd.c:1733
msgid "Backwards range given, OK to swap"
-msgstr "Takaperoinen arvoalue annettu, OK knt"
+msgstr "Takaperoinen arvoalue annettu, OK kääntää"
#. append
#. typed wrong
-#: ../ex_docmd.c:1787
msgid "E494: Use w or w>>"
-msgstr "E494: Kyt w:t tai w>>:aa"
-
-#: ../ex_docmd.c:3454
-msgid "E319: The command is not available in this version"
-msgstr "E319: Komento ei ole kytettviss tss versiossa"
+msgstr "E494: Käytä w:tä tai w>>:aa"
-#: ../ex_docmd.c:3752
-msgid "E172: Only one file name allowed"
-msgstr "E172: Vain yksi tiedostonimi sallitaan"
+#, fuzzy
+#~ msgid "E319: The command is not available in this version"
+#~ msgstr "E319: Komento ei ole käytettävissä tässä versiossa"
-#: ../ex_docmd.c:4238
msgid "1 more file to edit. Quit anyway?"
-msgstr "viel 1 tiedosto muokattavana, lopetaanko silti?"
+msgstr "vielä 1 tiedosto muokattavana, lopetaanko silti?"
-#: ../ex_docmd.c:4242
#, c-format
msgid "%d more files to edit. Quit anyway?"
-msgstr "viel %d tiedostoa muokattavana, lopetetaanko silti?"
+msgstr "vielä %d tiedostoa muokattavana, lopetetaanko silti?"
-#: ../ex_docmd.c:4248
msgid "E173: 1 more file to edit"
-msgstr "E173: viel 1 tiedosto muokattavana"
+msgstr "E173: vielä 1 tiedosto muokattavana"
-#: ../ex_docmd.c:4250
-#, c-format
-msgid "E173: %<PRId64> more files to edit"
-msgstr "E173: viel %<PRId64> tiedostoa muokattavana"
+#, fuzzy, c-format
+#~ msgid "E173: %<PRId64> more files to edit"
+#~ msgstr "E173: vielä %ld tiedostoa muokattavana"
-#: ../ex_docmd.c:4320
msgid "E174: Command already exists: add ! to replace it"
-msgstr "E174: Komento on jo olemassa, kyt !: korvataksesi"
+msgstr "E174: Komento on jo olemassa, käytä !:ä korvataksesi"
-#: ../ex_docmd.c:4432
msgid ""
"\n"
-" Name Args Range Complete Definition"
+" Name Args Address Complete Definition"
msgstr ""
"\n"
-" Nimi Arg Arvot Valmis Mritelm"
+" Nimi Argumentit Osoite Valmis Määritelmä"
-#: ../ex_docmd.c:4516
msgid "No user-defined commands found"
-msgstr "Ei kyttjn mrittelemi komentoja"
+msgstr "Ei käyttäjän määrittelemiä komentoja"
-#: ../ex_docmd.c:4538
msgid "E175: No attribute specified"
-msgstr "E175: Ei attribuutteja mriteltyn"
+msgstr "E175: Ei attribuutteja määriteltynä"
-#: ../ex_docmd.c:4583
msgid "E176: Invalid number of arguments"
-msgstr "E176: Vr mr attribuutteja"
+msgstr "E176: Väärä määrä attribuutteja"
-#: ../ex_docmd.c:4594
msgid "E177: Count cannot be specified twice"
-msgstr "E177: Lukumr ei voi mritell kahdesti"
+msgstr "E177: Lukumäärää ei voi määritellä kahdesti"
-#: ../ex_docmd.c:4603
msgid "E178: Invalid default value for count"
-msgstr "E178: Lukumrn oletusarvo on vr"
+msgstr "E178: Lukumäärän oletusarvo on väärä"
-#: ../ex_docmd.c:4625
msgid "E179: argument required for -complete"
msgstr "E179: -complete vaatii argumentin"
-#: ../ex_docmd.c:4635
+msgid "E179: argument required for -addr"
+msgstr "E179: -addr vaatii argumentin"
+
#, c-format
msgid "E181: Invalid attribute: %s"
msgstr "E181: Virheellinen attribuutti: %s"
-#: ../ex_docmd.c:4678
msgid "E182: Invalid command name"
msgstr "E182: Virheellinen komennon nimi"
-#: ../ex_docmd.c:4691
msgid "E183: User defined commands must start with an uppercase letter"
-msgstr "E183: Kyttjn mrittelemn komennon pit alkaa suuraakkosella"
+msgstr "E183: Käyttäjän määrittelemän komennon pitää alkaa suuraakkosella"
-#: ../ex_docmd.c:4696
-#, fuzzy
msgid "E841: Reserved name, cannot be used for user defined command"
-msgstr "E464: Kyttjn mrittelemn komennon monimerkityksinen kytt"
+msgstr "E841: Varattua nimeä ei voi käyttää käyttäjän määrittelemänä komentona"
-#: ../ex_docmd.c:4751
#, c-format
msgid "E184: No such user-defined command: %s"
-msgstr "E184: Kyttjn komentoa ei ole olemassa: %s"
+msgstr "E184: Käyttäjän komentoa ei ole olemassa: %s"
+
+#, c-format
+msgid "E180: Invalid address type value: %s"
+msgstr "E180: Virheellinen osoitetyyppiarvo: %s"
-#: ../ex_docmd.c:5219
#, c-format
msgid "E180: Invalid complete value: %s"
-msgstr "E180: Virheellinen tydennysarvo: %s"
+msgstr "E180: Virheellinen täydennysarvo: %s"
-#: ../ex_docmd.c:5225
msgid "E468: Completion argument only allowed for custom completion"
-msgstr "E468: Tydennysargumentti sopii vain itse mriteltyyn tydennykseen"
+msgstr "E468: Täydennysargumentti sopii vain itse määriteltyyn täydennykseen"
-#: ../ex_docmd.c:5231
msgid "E467: Custom completion requires a function argument"
-msgstr "E467: Itse mritelty tydennys vaatii funktioargumentin"
+msgstr "E467: Itse määritelty täydennys vaatii funktioargumentin"
-#: ../ex_docmd.c:5257
-#, fuzzy, c-format
+#, c-format
msgid "E185: Cannot find color scheme '%s'"
-msgstr "E185: Vriteemaa %s ei lydy"
+msgstr "E185: Väriteemaa %s ei löydy"
-#: ../ex_docmd.c:5263
msgid "Greetings, Vim user!"
-msgstr "Tervehdys, Vimin kyttj."
+msgstr "Tervehdys, Vimin käyttäjä."
-#: ../ex_docmd.c:5431
msgid "E784: Cannot close last tab page"
-msgstr "E784: Viimeist vlilehte ei voi sulkea"
+msgstr "E784: Viimeistä välilehteä ei voi sulkea"
-#: ../ex_docmd.c:5462
msgid "Already only one tab page"
-msgstr "Vain yksi vlilehti jljell en"
+msgstr "Vain yksi välilehti jäljellä enää"
-#: ../ex_docmd.c:6004
#, c-format
msgid "Tab page %d"
msgstr "Tabisivu %d"
-#: ../ex_docmd.c:6295
msgid "No swap file"
msgstr "Ei swap-tiedostoa"
-#: ../ex_docmd.c:6478
-msgid "E747: Cannot change directory, buffer is modified (add ! to override)"
-msgstr ""
-"E747: Hakemistoa ei voida muuttaa, puskuria on muokattu (lis komentoon ! "
-"ohittaaksesi"
-
-#: ../ex_docmd.c:6485
msgid "E186: No previous directory"
-msgstr "E186: Ei edellist hakemistoa"
+msgstr "E186: Ei edellistä hakemistoa"
-#: ../ex_docmd.c:6530
msgid "E187: Unknown"
msgstr "E187: Tuntematon"
-#: ../ex_docmd.c:6610
msgid "E465: :winsize requires two number arguments"
msgstr "E465: :winsize vaatii kaksi numeroargumenttia"
-#: ../ex_docmd.c:6655
-msgid "E188: Obtaining window position not implemented for this platform"
-msgstr "E188: Ikkunan sijainnin selvitys ei toimi tll alustalla"
-
-#: ../ex_docmd.c:6662
-msgid "E466: :winpos requires two number arguments"
-msgstr "E466: :winpos vaatii kaksi lukuargumenttia"
-
-#: ../ex_docmd.c:7241
-#, c-format
-msgid "E739: Cannot create directory: %s"
-msgstr "E739: hakemistoa ei voi luoda: %s"
-
-#: ../ex_docmd.c:7268
#, c-format
msgid "E189: \"%s\" exists (add ! to override)"
-msgstr "E189: %s on jo olemassa (lis komentoon ! ohittaaksesi)"
+msgstr "E189: %s on jo olemassa (lisää komentoon ! ohittaaksesi)"
-#: ../ex_docmd.c:7273
#, c-format
msgid "E190: Cannot open \"%s\" for writing"
msgstr "E190: Tiedostoa %s ei voitu avata kirjoittamista varten"
#. set mark
-#: ../ex_docmd.c:7294
msgid "E191: Argument must be a letter or forward/backward quote"
-msgstr "E191: Argumentin eteen- tai taaksepin lainaukseen pit olla kirjain"
+msgstr "E191: Argumentin eteen- tai taaksepäin lainaukseen pitää olla kirjain"
-#: ../ex_docmd.c:7333
msgid "E192: Recursive use of :normal too deep"
-msgstr "E192: :normalin liian syv rekursio"
+msgstr "E192: :normalin liian syvä rekursio"
-#: ../ex_docmd.c:7807
msgid "E194: No alternate file name to substitute for '#'"
-msgstr "E194: Ei vaihtoehtoista tiedostonime #:lle"
+msgstr "E194: Ei vaihtoehtoista tiedostonimeä #:lle"
-#: ../ex_docmd.c:7841
msgid "E495: no autocommand file name to substitute for \"<afile>\""
msgstr "E495: ei autocommand-tiedostoa kohteelle <afile>"
-#: ../ex_docmd.c:7850
msgid "E496: no autocommand buffer number to substitute for \"<abuf>\""
msgstr "E496: ei autocommand-puskurinumeroa kohteelle <abuf>"
-#: ../ex_docmd.c:7861
msgid "E497: no autocommand match name to substitute for \"<amatch>\""
-msgstr "E497: ei autocommand-tsmysnime kohteella <amatch>"
+msgstr "E497: ei autocommand-täsmäysnimeä kohteella <amatch>"
-#: ../ex_docmd.c:7870
msgid "E498: no :source file name to substitute for \"<sfile>\""
-msgstr "E498: ei :source-tiedostonime kohteelle <sfile>"
+msgstr "E498: ei :source-tiedostonimeä kohteelle <sfile>"
-#: ../ex_docmd.c:7876
-#, fuzzy
msgid "E842: no line number to use for \"<slnum>\""
-msgstr "E498: ei :source-tiedostonime kohteelle <sfile>"
+msgstr "E842: ei rivinumeroa kohteelle <slnum>"
-#: ../ex_docmd.c:7903
#, fuzzy, c-format
-msgid "E499: Empty file name for '%' or '#', only works with \":p:h\""
-msgstr "E499: Tyhj tiedostonimi kohteissa % tai # toimii vain :p:h"
+#~ msgid "E499: Empty file name for '%' or '#', only works with \":p:h\""
+#~ msgstr "E499: Tyhjä tiedostonimi kohteissa % tai # toimii vain :p:h"
-#: ../ex_docmd.c:7905
msgid "E500: Evaluates to an empty string"
-msgstr "E500: Loppuarvo on tyhj merkkijono"
-
-#: ../ex_docmd.c:8838
-msgid "E195: Cannot open viminfo file for reading"
-msgstr "E195: Viminfoa ei voi avata lukemista varten"
+msgstr "E500: Loppuarvo on tyhjä merkkijono"
-#: ../ex_eval.c:464
msgid "E608: Cannot :throw exceptions with 'Vim' prefix"
-msgstr "E608: Vim-alkuisia poikkeuksia ei voi heitt :throw-komennolla"
+msgstr "E608: Vim-alkuisia poikkeuksia ei voi heittää :throw-komennolla"
#. always scroll up, don't overwrite
-#: ../ex_eval.c:496
#, c-format
msgid "Exception thrown: %s"
msgstr "Poikkeus heitetty: %s"
-#: ../ex_eval.c:545
+#. always scroll up, don't overwrite
#, c-format
msgid "Exception finished: %s"
msgstr "Poikkeus lopeteltu: %s"
-#: ../ex_eval.c:546
#, c-format
msgid "Exception discarded: %s"
msgstr "Poikkeus poistettu: %s"
-#: ../ex_eval.c:588 ../ex_eval.c:634
-#, c-format
-msgid "%s, line %<PRId64>"
-msgstr "%s, rivi %<PRId64>"
+#, fuzzy, c-format
+#~ msgid "%s, line %<PRId64>"
+#~ msgstr "%s, rivi %ld"
#. always scroll up, don't overwrite
-#: ../ex_eval.c:608
#, c-format
msgid "Exception caught: %s"
msgstr "Poikkeus otettu kiinni: %s"
-#: ../ex_eval.c:676
#, c-format
msgid "%s made pending"
msgstr "%s odotutettu"
-#: ../ex_eval.c:679
#, c-format
msgid "%s resumed"
msgstr "%s palautettu"
-#: ../ex_eval.c:683
#, c-format
msgid "%s discarded"
msgstr "%s poistettu"
-#: ../ex_eval.c:708
msgid "Exception"
msgstr "Poikkeus"
-#: ../ex_eval.c:713
msgid "Error and interrupt"
msgstr "Virhe ja keskeytys"
-#: ../ex_eval.c:715
msgid "Error"
msgstr "Virhe"
#. if (pending & CSTP_INTERRUPT)
-#: ../ex_eval.c:717
msgid "Interrupt"
msgstr "Keskeytys"
-#: ../ex_eval.c:795
msgid "E579: :if nesting too deep"
msgstr "E579: liian monta kerrosta :if-komennossa"
-#: ../ex_eval.c:830
msgid "E580: :endif without :if"
msgstr "E580: :endif ilman komentoa :if"
-#: ../ex_eval.c:873
msgid "E581: :else without :if"
msgstr "E581: :else ilman komentoa :if"
-#: ../ex_eval.c:876
msgid "E582: :elseif without :if"
msgstr "E582: :elseif ilman komentoa :if"
-#: ../ex_eval.c:880
msgid "E583: multiple :else"
msgstr "E583: :else monta kertaa"
-#: ../ex_eval.c:883
msgid "E584: :elseif after :else"
-msgstr "E584: :elseif komennon :else jlkeen"
+msgstr "E584: :elseif komennon :else jälkeen"
-#: ../ex_eval.c:941
msgid "E585: :while/:for nesting too deep"
msgstr "E585: liian monta tasoa :while- tai :for-komennoissa"
-#: ../ex_eval.c:1028
msgid "E586: :continue without :while or :for"
msgstr "E586: :continue ilman komentoa :while tai :for"
-#: ../ex_eval.c:1061
msgid "E587: :break without :while or :for"
msgstr "E587: :break ilman komentoa :while tai :for"
-#: ../ex_eval.c:1102
msgid "E732: Using :endfor with :while"
msgstr "E732: :endfor ilman komentoa :while"
-#: ../ex_eval.c:1104
msgid "E733: Using :endwhile with :for"
msgstr "E733: :endwhile ilman komentoa :for"
-#: ../ex_eval.c:1247
msgid "E601: :try nesting too deep"
msgstr "E601: liian monta tasoa :try-komennossa"
-#: ../ex_eval.c:1317
msgid "E603: :catch without :try"
msgstr "E603: :catch ilman komentoa :try"
#. Give up for a ":catch" after ":finally" and ignore it.
#. * Just parse.
-#: ../ex_eval.c:1332
msgid "E604: :catch after :finally"
msgstr "E604: :catch ilman komentoa :finally"
-#: ../ex_eval.c:1451
msgid "E606: :finally without :try"
msgstr "E606: :finally ilman komentoa :try"
#. Give up for a multiple ":finally" and ignore it.
-#: ../ex_eval.c:1467
msgid "E607: multiple :finally"
msgstr "E607: :finally monta kertaa"
-#: ../ex_eval.c:1571
msgid "E602: :endtry without :try"
msgstr "E602: :endtry ilman komentoa :try"
-#: ../ex_eval.c:2026
msgid "E193: :endfunction not inside a function"
msgstr "E193: :endfunction funktion ulkopuolella"
-#: ../ex_getln.c:1643
msgid "E788: Not allowed to edit another buffer now"
msgstr "E788: Puskuria ei voi muokata nyt"
-#: ../ex_getln.c:1656
msgid "E811: Not allowed to change buffer information now"
msgstr "E811: Puskuria ei voi vaihtaa nyt"
-#: ../ex_getln.c:3178
msgid "tagname"
-msgstr "tginimi"
+msgstr "täginimi"
-#: ../ex_getln.c:3181
msgid " kind file\n"
msgstr " -tiedostotyyppi\n"
-#: ../ex_getln.c:4799
msgid "'history' option is zero"
msgstr "history-asetus on nolla"
-#: ../ex_getln.c:5046
-#, c-format
-msgid ""
-"\n"
-"# %s History (newest to oldest):\n"
-msgstr ""
-"\n"
-"# %s Historia (uusimmasta alkaen):\n"
-
-#: ../ex_getln.c:5047
-msgid "Command Line"
-msgstr "Komentorivi"
-
-#: ../ex_getln.c:5048
-msgid "Search String"
-msgstr "Hakujono"
-
-#: ../ex_getln.c:5049
-msgid "Expression"
-msgstr "Ilmaus"
-
-#: ../ex_getln.c:5050
-msgid "Input Line"
-msgstr "Syterivi"
-
-#: ../ex_getln.c:5117
msgid "E198: cmd_pchar beyond the command length"
msgstr "E198: cmd_pchar komennon pituuden ulkopuolella"
-#: ../ex_getln.c:5279
msgid "E199: Active window or buffer deleted"
msgstr "E199: Aktiivinen ikkuna tai puskuri poistettu"
-#: ../file_search.c:203
msgid "E854: path too long for completion"
-msgstr ""
+msgstr "E854: polku on liian pitkä täydennykseen"
-#: ../file_search.c:446
#, c-format
msgid ""
"E343: Invalid path: '**[number]' must be at the end of the path or be "
@@ -2011,376 +2098,296 @@ msgstr ""
"E343: Virheellinen polku: '**[numero]' kuuluu polun loppuun tai ennen kohtaa "
"%s."
-#: ../file_search.c:1505
#, c-format
msgid "E344: Can't find directory \"%s\" in cdpath"
-msgstr "E344: Hakemistoa %s ei lydy cdpathista"
+msgstr "E344: Hakemistoa %s ei löydy cdpathista"
-#: ../file_search.c:1508
#, c-format
msgid "E345: Can't find file \"%s\" in path"
-msgstr "E345: Tiedostoa %s ei lydy polulta"
+msgstr "E345: Tiedostoa %s ei löydy polulta"
-#: ../file_search.c:1512
#, c-format
msgid "E346: No more directory \"%s\" found in cdpath"
-msgstr "E346: Hakemisto %s ei ole en cdpathissa"
+msgstr "E346: Hakemisto %s ei ole enää cdpathissa"
-#: ../file_search.c:1515
#, c-format
msgid "E347: No more file \"%s\" found in path"
-msgstr "E347: Tiedosto %s ei ole en polulla"
+msgstr "E347: Tiedosto %s ei ole enää polulla"
-#: ../fileio.c:137
msgid "E812: Autocommands changed buffer or buffer name"
msgstr "E812: Autocommands muutti puskurin tai sen nimen"
-#: ../fileio.c:368
msgid "Illegal file name"
msgstr "Virheellinen tiedostonimi"
-#: ../fileio.c:395 ../fileio.c:476 ../fileio.c:2543 ../fileio.c:2578
msgid "is a directory"
msgstr "on hakemisto"
-#: ../fileio.c:397
msgid "is not a file"
msgstr "ei ole tiedosto"
-#: ../fileio.c:508 ../fileio.c:3522
msgid "[New File]"
msgstr "[Uusi tiedosto]"
-#: ../fileio.c:511
msgid "[New DIRECTORY]"
msgstr "[uusi HAKEMISTO]"
-#: ../fileio.c:529 ../fileio.c:532
+#. libuv only returns -errno in Unix and in Windows open() does not
+#. set EOVERFLOW
msgid "[File too big]"
msgstr "[Liian iso tiedosto]"
-#: ../fileio.c:534
msgid "[Permission Denied]"
msgstr "[Lupa kielletty]"
-#: ../fileio.c:653
msgid "E200: *ReadPre autocommands made the file unreadable"
msgstr ""
-"E200: *ReadPre-autocommand-komennot tekivt tiedostosta lukukelvottoman"
+"E200: *ReadPre-autocommand-komennot tekivät tiedostosta lukukelvottoman"
-#: ../fileio.c:655
msgid "E201: *ReadPre autocommands must not change current buffer"
-msgstr "E201: *ReadPre-autocommand-komennot eivt saa muuttaa puskuria"
-
-#: ../fileio.c:672
-msgid "Nvim: Reading from stdin...\n"
-msgstr "Vim: Luetaan vakiosytteest...\n"
+msgstr "E201: *ReadPre-autocommand-komennot eivät saa muuttaa puskuria"
#. Re-opening the original file failed!
-#: ../fileio.c:909
msgid "E202: Conversion made file unreadable!"
msgstr "E202: Muunnos teki tiedostosta lukukelvottoman."
#. fifo or socket
-#: ../fileio.c:1782
msgid "[fifo/socket]"
msgstr "[fifo t. soketti]"
#. fifo
-#: ../fileio.c:1788
msgid "[fifo]"
msgstr "[fifo]"
#. or socket
-#: ../fileio.c:1794
msgid "[socket]"
msgstr "[soketti]"
#. or character special
-#: ../fileio.c:1801
msgid "[character special]"
msgstr "[merkki erikoinen]"
-# Carriage Return elikk rivinvaihtomerkin ers muoto/osa (vrt. LF)
-#: ../fileio.c:1815
+# Carriage Return elikkä rivinvaihtomerkin eräs muoto/osa (vrt. LF)
msgid "[CR missing]"
msgstr "[CR puuttuu]"
-#: ../fileio.c:1819
msgid "[long lines split]"
-msgstr "[pitkt rivit hajotettu]"
+msgstr "[pitkät rivit hajotettu]"
-#: ../fileio.c:1823 ../fileio.c:3512
msgid "[NOT converted]"
msgstr "[EI muunnettu]"
-#: ../fileio.c:1826 ../fileio.c:3515
msgid "[converted]"
msgstr "[muunnettu]"
-#: ../fileio.c:1831
-#, c-format
-msgid "[CONVERSION ERROR in line %<PRId64>]"
-msgstr "[MUUNNOSVIRHE rivill %<PRId64>]"
+#, fuzzy, c-format
+#~ msgid "[CONVERSION ERROR in line %<PRId64>]"
+#~ msgstr "[MUUNNOSVIRHE rivillä %ld]"
-#: ../fileio.c:1835
-#, c-format
-msgid "[ILLEGAL BYTE in line %<PRId64>]"
-msgstr "[VIRHEELLINEN OKTETTI rivill %<PRId64>]"
+#, fuzzy, c-format
+#~ msgid "[ILLEGAL BYTE in line %<PRId64>]"
+#~ msgstr "[VIRHEELLINEN OKTETTI rivillä %ld]"
-#: ../fileio.c:1838
msgid "[READ ERRORS]"
-msgstr "[LUKUVIRHEIT]"
+msgstr "[LUKUVIRHEITÄ]"
-#: ../fileio.c:2104
msgid "Can't find temp file for conversion"
-msgstr "Ei voi lyt vliaikaistiedstoa muuntamiseksi"
+msgstr "Ei voi löytää väliaikaistiedstoa muuntamiseksi"
-#: ../fileio.c:2110
msgid "Conversion with 'charconvert' failed"
-msgstr "Muunnos charconvert eponnistui"
+msgstr "Muunnos charconvert epäonnistui"
-#: ../fileio.c:2113
msgid "can't read output of 'charconvert'"
msgstr "charconvertin tulostetta ei voida lukea"
-#: ../fileio.c:2437
msgid "E676: No matching autocommands for acwrite buffer"
msgstr "E676: Ei autocommand-komentoa acwrite-puskurille"
-#: ../fileio.c:2466
msgid "E203: Autocommands deleted or unloaded buffer to be written"
msgstr ""
"E203: Autocommand-komennot poistivat tai vapauttivat puskurin, johon piti "
"kirjoittaa"
-#: ../fileio.c:2486
msgid "E204: Autocommand changed number of lines in unexpected way"
-msgstr "E204: Autocommand-komento muutti rivien mr odottamatta"
+msgstr "E204: Autocommand-komento muutti rivien määrä odottamatta"
-#: ../fileio.c:2548 ../fileio.c:2565
msgid "is not a file or writable device"
msgstr "ei ole tiedosto tai kirjoitettava laite"
-#: ../fileio.c:2601
msgid "is read-only (add ! to override)"
-msgstr "on kirjoitussuojattu (lis komentoon ! ohittaaksesi)"
+msgstr "on kirjoitussuojattu (lisää komentoon ! ohittaaksesi)"
-#: ../fileio.c:2886
msgid "E506: Can't write to backup file (add ! to override)"
msgstr ""
-"E506: Ei voi kirjoittaa varmuuskopiotiedostoon (lis komentoon ! "
+"E506: Ei voi kirjoittaa varmuuskopiotiedostoon (lisää komentoon ! "
"ohittaaksesi)"
-#: ../fileio.c:2898
-msgid "E507: Close error for backup file (add ! to override)"
-msgstr ""
-"E507: Varmuuskopiotiedoston sulkeminen ei onnistu (lis komentoon ! "
-"ohittaaksesi)"
+#, fuzzy, c-format
+#~ msgid "E507: Close error for backup file (add ! to override): %s"
+#~ msgstr ""
+#~ "E507: Varmuuskopiotiedoston sulkeminen ei onnistu (lisää komentoon ! "
+#~ "ohittaaksesi)"
-#: ../fileio.c:2901
msgid "E508: Can't read file for backup (add ! to override)"
msgstr ""
-"E508: Varmuuskopiotiedostoa ei voi lukea (lis komentoon ! ohittaaksesi)"
+"E508: Varmuuskopiotiedostoa ei voi lukea (lisää komentoon ! ohittaaksesi)"
-#: ../fileio.c:2923
msgid "E509: Cannot create backup file (add ! to override)"
msgstr ""
-"E509: Ei voi luoda varmuuskopiotiedostoa (lis komentoon ! ohittaaksesi)"
+"E509: Ei voi luoda varmuuskopiotiedostoa (lisää komentoon ! ohittaaksesi)"
-#: ../fileio.c:3008
msgid "E510: Can't make backup file (add ! to override)"
msgstr ""
-"E510: Ei voi tehd varmuuskopiotiedostoa (lis komentoon ! ohittaaksesi)"
+"E510: Ei voi tehdä varmuuskopiotiedostoa (lisää komentoon ! ohittaaksesi)"
#. Can't write without a tempfile!
-#: ../fileio.c:3121
msgid "E214: Can't find temp file for writing"
-msgstr "E214: Ei voi lyt vliaikaistiedostoa kirjoitettavaksi"
+msgstr "E214: Ei voi löytää väliaikaistiedostoa kirjoitettavaksi"
-#: ../fileio.c:3134
msgid "E213: Cannot convert (add ! to write without conversion)"
msgstr ""
-"E213: Muunnos ei onnistu (lis komentoon ! kirjoittaaksesi muuntamatta)"
+"E213: Muunnos ei onnistu (lisää komentoon ! kirjoittaaksesi muuntamatta)"
-#: ../fileio.c:3169
msgid "E166: Can't open linked file for writing"
msgstr "E166: Linkitetyn tiedoston avaus kirjoittamista varten ei onnistu"
-#: ../fileio.c:3173
-msgid "E212: Can't open file for writing"
-msgstr "E212: Tiedoston avaus kirjoittamista varten ei onnistu"
+#, fuzzy, c-format
+#~ msgid "E212: Can't open file for writing: %s"
+#~ msgstr "E212: Tiedoston avaus kirjoittamista varten ei onnistu"
-#: ../fileio.c:3363
-msgid "E667: Fsync failed"
-msgstr "E667: Fsync ei onnistunut"
+#, fuzzy, c-format
+#~ msgid "E667: Fsync failed: %s"
+#~ msgstr "E667: Fsync ei onnistunut"
-#: ../fileio.c:3398
-msgid "E512: Close failed"
-msgstr "E512: Sulkeminen ei onnistunut"
+#, fuzzy, c-format
+#~ msgid "E512: Close failed: %s"
+#~ msgstr "E512: Sulkeminen ei onnistunut"
-#: ../fileio.c:3436
msgid "E513: write error, conversion failed (make 'fenc' empty to override)"
-msgstr "E513: kirjoitusvirhe, muunnos eponnistui (tyhj fenc ohittaaksesi)"
+msgstr "E513: kirjoitusvirhe, muunnos epäonnistui (tyhjää fenc ohittaaksesi)"
-#: ../fileio.c:3441
-#, c-format
-msgid ""
-"E513: write error, conversion failed in line %<PRId64> (make 'fenc' empty to "
-"override)"
-msgstr ""
-"E513: kirjoitusvirhe, muunnos eponnistui rivill %<PRId64>(tyhj fenc "
-"ohittaaksesi)"
+#, fuzzy
+#~ msgid "E513: write error, conversion failed in line %"
+#~ msgstr ""
+#~ "E513: kirjoitusvirhe, muunnos epäonnistui rivillä %ld(tyhjää fenc "
+#~ "ohittaaksesi)"
-#: ../fileio.c:3448
msgid "E514: write error (file system full?)"
-msgstr "E514: kirjoitusvirhe (tiedostojrjestelm tysi)"
+msgstr "E514: kirjoitusvirhe (tiedostojärjestelmä täysi)"
-#: ../fileio.c:3506
msgid " CONVERSION ERROR"
msgstr " MUUNNOSVIRHE"
-#: ../fileio.c:3509
-#, c-format
-msgid " in line %<PRId64>;"
-msgstr " rivill %<PRId64>"
+#, fuzzy, c-format
+#~ msgid " in line %<PRId64>;"
+#~ msgstr " rivillä %ld"
-#: ../fileio.c:3519
msgid "[Device]"
msgstr "[Laite]"
-#: ../fileio.c:3522
msgid "[New]"
msgstr "[Uusi]"
-#: ../fileio.c:3535
msgid " [a]"
msgstr " [a]"
-#: ../fileio.c:3535
msgid " appended"
-msgstr " listty"
+msgstr " lisätty"
-#: ../fileio.c:3537
msgid " [w]"
msgstr " [w]"
-#: ../fileio.c:3537
msgid " written"
msgstr " kirjoitettu"
-#: ../fileio.c:3579
msgid "E205: Patchmode: can't save original file"
-msgstr "E205: Patch-tilassa ei voi tallentaa alkuperistiedostoa"
+msgstr "E205: Patch-tilassa ei voi tallentaa alkuperäistiedostoa"
-#: ../fileio.c:3602
msgid "E206: patchmode: can't touch empty original file"
-msgstr "E206: patch-tilassa ei voi muuttaa tyhj alkuperistiedostoa"
+msgstr "E206: patch-tilassa ei voi muuttaa tyhjää alkuperäistiedostoa"
-#: ../fileio.c:3616
msgid "E207: Can't delete backup file"
msgstr "E207: Ei voi poistaa varmuuskopiota"
-#: ../fileio.c:3672
+#. Set highlight for error messages.
msgid ""
"\n"
"WARNING: Original file may be lost or damaged\n"
msgstr ""
"\n"
-"VAROITUS: Alkuperistiedosto voi hvit tai vahingoittua\n"
+"VAROITUS: Alkuperäistiedosto voi hävitä tai vahingoittua\n"
-#: ../fileio.c:3675
msgid "don't quit the editor until the file is successfully written!"
-msgstr "l lopeta editoria kesken tallentamisen."
+msgstr "älä lopeta editoria kesken tallentamisen."
-#: ../fileio.c:3795
-msgid "[dos]"
-msgstr "[dos]"
-
-#: ../fileio.c:3795
msgid "[dos format]"
msgstr "[dos-muoto]"
-#: ../fileio.c:3801
-msgid "[mac]"
-msgstr "[mac]"
+msgid "[dos]"
+msgstr "[dos]"
-#: ../fileio.c:3801
msgid "[mac format]"
msgstr "[mac-muoto]"
-#: ../fileio.c:3807
-msgid "[unix]"
-msgstr "[unix]"
+msgid "[mac]"
+msgstr "[mac]"
-#: ../fileio.c:3807
msgid "[unix format]"
msgstr "[unix-muoto]"
-#: ../fileio.c:3831
+msgid "[unix]"
+msgstr "[unix]"
+
msgid "1 line, "
msgstr "1 rivi, "
-#: ../fileio.c:3833
-#, c-format
-msgid "%<PRId64> lines, "
-msgstr "%<PRId64> rivi, "
+#, fuzzy, c-format
+#~ msgid "%<PRId64> lines, "
+#~ msgstr "%ld riviä, "
-#: ../fileio.c:3836
msgid "1 character"
msgstr "1 merkki"
-#: ../fileio.c:3838
-#, c-format
-msgid "%<PRId64> characters"
-msgstr "%<PRId64> merkki"
+#, fuzzy, c-format
+#~ msgid "%<PRId64> characters"
+#~ msgstr "%lld merkkiä"
+
+msgid "[Incomplete last line]"
+msgstr "[Vajaa viimeinen rivi]"
# ei rivinvaihtoja
-#: ../fileio.c:3849
msgid "[noeol]"
msgstr "[eiriviv.]"
-#: ../fileio.c:3849
-msgid "[Incomplete last line]"
-msgstr "[Vajaa viimeinen rivi]"
-
-# Jos aukiolevaa tiedostoa srkkii toisella ohjelmalla
-#. don't overwrite messages here
-#. must give this prompt
-#. don't use emsg() here, don't want to flush the buffers
-#: ../fileio.c:3865
+# Jos aukiolevaa tiedostoa sörkkii toisella ohjelmalla
+#. Don't overwrite messages here.
+#. Must give this prompt.
+#. Don't use emsg() here, don't want to flush the buffers.
msgid "WARNING: The file has been changed since reading it!!!"
-msgstr "VAROITUS: tiedosto on muuttunut viime lukukerran jlkeen!"
+msgstr "VAROITUS: tiedosto on muuttunut viime lukukerran jälkeen!"
-#: ../fileio.c:3867
msgid "Do you really want to write to it"
msgstr "Kirjoitetaanko"
-#: ../fileio.c:4648
#, c-format
msgid "E208: Error writing to \"%s\""
msgstr "E208: Virhe kirjoitettaessa tiedostoon %s"
-#: ../fileio.c:4655
#, c-format
msgid "E209: Error closing \"%s\""
msgstr "E209: Virhe suljettaessa tiedostoa %s"
-#: ../fileio.c:4657
#, c-format
msgid "E210: Error reading \"%s\""
msgstr "E210: Virhe luettaessa tiedostoa %s"
-#: ../fileio.c:4883
msgid "E246: FileChangedShell autocommand deleted buffer"
msgstr "E246: FileChangedShell-autocommand poisti puskurin"
-#: ../fileio.c:4894
#, c-format
msgid "E211: File \"%s\" no longer available"
-msgstr "E211: Tiedostoa %s ei ole en"
+msgstr "E211: Tiedostoa %s ei ole enää"
-#: ../fileio.c:4906
#, c-format
msgid ""
"W12: Warning: File \"%s\" has changed and the buffer was changed in Vim as "
@@ -2389,41 +2396,33 @@ msgstr ""
"W12: Varoitus: Tiedostoa %s on muutettu ja Vimin puskurissa on muutoksia "
"tiedostoon"
-#: ../fileio.c:4907
msgid "See \":help W12\" for more info."
-msgstr ":help W12 kertoo listietoja."
+msgstr ":help W12 kertoo lisätietoja."
-#: ../fileio.c:4910
#, c-format
msgid "W11: Warning: File \"%s\" has changed since editing started"
-msgstr "W11: Varoitus: Tiedostoa %s on muutettu muokkauksen aloituksen jlkeen"
+msgstr "W11: Varoitus: Tiedostoa %s on muutettu muokkauksen aloituksen jälkeen"
-#: ../fileio.c:4911
msgid "See \":help W11\" for more info."
-msgstr ":help W11 kertoo listietoja."
+msgstr ":help W11 kertoo lisätietoja."
-#: ../fileio.c:4914
#, c-format
msgid "W16: Warning: Mode of file \"%s\" has changed since editing started"
msgstr ""
"W16: Varoitus: Tiedoston %s oikeuksia on muutettu muokkauksen aloituksen "
-"jlkeen"
+"jälkeen"
-#: ../fileio.c:4915
msgid "See \":help W16\" for more info."
-msgstr ":help W16 kertoo listietoja."
+msgstr ":help W16 kertoo lisätietoja."
-#: ../fileio.c:4927
#, c-format
msgid "W13: Warning: File \"%s\" has been created after editing started"
-msgstr "W13: Varoitus: Tiedosto %s on luotu muokkauksen aloituksen jlkeen"
+msgstr "W13: Varoitus: Tiedosto %s on luotu muokkauksen aloituksen jälkeen"
-#: ../fileio.c:4947
msgid "Warning"
msgstr "Varoitus"
-# yll olevien varoitusten ratkaisut
-#: ../fileio.c:4948
+# yllä olevien varoitusten ratkaisut
msgid ""
"&OK\n"
"&Load File"
@@ -2431,48 +2430,46 @@ msgstr ""
"&OK\n"
"&Avaa tiedosto uudelleen"
-#: ../fileio.c:5065
#, c-format
msgid "E462: Could not prepare for reloading \"%s\""
msgstr "E462: Ei voitu valmistella uudelleen avausta %s"
-#: ../fileio.c:5078
#, c-format
msgid "E321: Could not reload \"%s\""
msgstr "E321: Ei voitu uudelleenavata %s"
-#: ../fileio.c:5601
msgid "--Deleted--"
msgstr "--Poistettu--"
-#: ../fileio.c:5732
#, c-format
msgid "auto-removing autocommand: %s <buffer=%d>"
msgstr "poistetaan autocommand automaattisesti: %s <puskuri=%d>"
#. the group doesn't exist
-#: ../fileio.c:5772
#, c-format
msgid "E367: No such group: \"%s\""
-msgstr "E367: Ryhm ei ole: %s"
+msgstr "E367: Ryhmää ei ole: %s"
+
+#, fuzzy
+#~ msgid "E936: Cannot delete the current group"
+#~ msgstr "E351: Taitosta ei voi poistaa tällä foldmethodilla"
+
+msgid "W19: Deleting augroup that is still in use"
+msgstr "W19: käytössä oleva augroup poistetaan"
-#: ../fileio.c:5897
#, c-format
msgid "E215: Illegal character after *: %s"
-msgstr "E215: Virheellinen merkki *:n jlkeen: %s"
+msgstr "E215: Virheellinen merkki *:n jälkeen: %s"
-#: ../fileio.c:5905
#, c-format
msgid "E216: No such event: %s"
-msgstr "E216: Eventti ei ole: %s"
+msgstr "E216: Eventtiä ei ole: %s"
-#: ../fileio.c:5907
#, c-format
msgid "E216: No such group or event: %s"
-msgstr "E216: Ryhm tai eventti ei ole: %s"
+msgstr "E216: Ryhmää tai eventtiä ei ole: %s"
#. Highlight title
-#: ../fileio.c:6090
msgid ""
"\n"
"--- Auto-Commands ---"
@@ -2480,762 +2477,611 @@ msgstr ""
"\n"
"--- Autocommandit ---"
-#: ../fileio.c:6293
#, c-format
msgid "E680: <buffer=%d>: invalid buffer number "
msgstr "E680: <puskuri=%d>: virheellinen puskurinumero"
-#: ../fileio.c:6370
msgid "E217: Can't execute autocommands for ALL events"
msgstr "E217: Ei voi suorittaa autocommandsia kaikille eventeille"
-#: ../fileio.c:6393
msgid "No matching autocommands"
-msgstr "Ei tsmvi autocommandsia"
+msgstr "Ei täsmääviä autocommandsia"
-#: ../fileio.c:6831
msgid "E218: autocommand nesting too deep"
msgstr "E218: liian monta tasoa autocommandissa"
-#: ../fileio.c:7143
#, c-format
msgid "%s Auto commands for \"%s\""
msgstr "%s Autocommands kohteelle %s"
-#: ../fileio.c:7149
#, c-format
msgid "Executing %s"
msgstr "Suoritetaan %s"
-#: ../fileio.c:7211
#, c-format
msgid "autocommand %s"
msgstr "autocommand %s"
-#: ../fileio.c:7795
msgid "E219: Missing {."
msgstr "E219: { puuttuu."
-#: ../fileio.c:7797
msgid "E220: Missing }."
msgstr "E220: } puuttuu."
-#: ../fold.c:93
msgid "E490: No fold found"
msgstr "E490: taitos puuttuu"
-#: ../fold.c:544
msgid "E350: Cannot create fold with current 'foldmethod'"
-msgstr "E350: Taitoksia ei voi tehd tll foldmethodilla"
+msgstr "E350: Taitoksia ei voi tehdä tällä foldmethodilla"
-#: ../fold.c:546
msgid "E351: Cannot delete fold with current 'foldmethod'"
-msgstr "E351: Taitosta ei voi poistaa tll foldmethodilla"
+msgstr "E351: Taitosta ei voi poistaa tällä foldmethodilla"
-#: ../fold.c:1784
-#, c-format
-msgid "+--%3ld lines folded "
-msgstr "+--%3ld rivi taitettu pois "
+#, fuzzy, c-format
+#~ msgid "+--%3ld lines folded "
+#~ msgstr "+--%3ld rivi taitettu pois "
#. buffer has already been read
-#: ../getchar.c:273
msgid "E222: Add to read buffer"
-msgstr "E222: Lis lukupuskuriin"
+msgstr "E222: Lisää lukupuskuriin"
-#: ../getchar.c:2040
msgid "E223: recursive mapping"
msgstr "E223: rekursiivinen kuvaus"
-#: ../getchar.c:2849
#, c-format
msgid "E224: global abbreviation already exists for %s"
-msgstr "E224: globaali lyhenne merkinnlle %s on jo olemassa"
+msgstr "E224: globaali lyhenne merkinnälle %s on jo olemassa"
-#: ../getchar.c:2852
#, c-format
msgid "E225: global mapping already exists for %s"
-msgstr "E225: globaali kuvaus merkinnlle %s on jo olemassa"
+msgstr "E225: globaali kuvaus merkinnälle %s on jo olemassa"
-#: ../getchar.c:2952
#, c-format
msgid "E226: abbreviation already exists for %s"
msgstr "E226: lyhenne on jo olemassa %s"
-#: ../getchar.c:2955
#, c-format
msgid "E227: mapping already exists for %s"
msgstr "E227: kuvaus on jo olemassa %s"
-#: ../getchar.c:3008
msgid "No abbreviation found"
-msgstr "Lyhennett ei lydy"
+msgstr "Lyhennettä ei löydy"
-#: ../getchar.c:3010
msgid "No mapping found"
-msgstr "Kuvausta ei lydy"
+msgstr "Kuvausta ei löydy"
-#: ../getchar.c:3974
msgid "E228: makemap: Illegal mode"
msgstr "E228: makemap: Virheellinen tila"
#. key value of 'cedit' option
#. type of cmdline window or 0
#. result of cmdline window or 0
-#: ../globals.h:924
msgid "--No lines in buffer--"
-msgstr "--Ei rivej puskurissa--"
+msgstr "--Ei rivejä puskurissa--"
#.
#. * The error messages that can be shared are included here.
#. * Excluded are errors that are only used once and debugging messages.
#.
-#: ../globals.h:996
msgid "E470: Command aborted"
msgstr "E470: Komento peruttu"
-#: ../globals.h:997
+#, fuzzy
+#~ msgid "E905: Cannot set this option after startup"
+#~ msgstr "E529: Termiä ei voi asettaa tyhjäksi merkkijonoksi"
+
+#, fuzzy
+#~ msgid "E903: Could not spawn API job"
+#~ msgstr "E623: Cscope-prosessin luonti epäonnistui"
+
msgid "E471: Argument required"
msgstr "E471: Argumentti puuttuu"
-#: ../globals.h:998
msgid "E10: \\ should be followed by /, ? or &"
-msgstr "E10: \\:n jlkeen pit tulla /, ? tai &"
+msgstr "E10: \\:n jälkeen pitää tulla /, ? tai &"
-#: ../globals.h:1000
msgid "E11: Invalid in command-line window; <CR> executes, CTRL-C quits"
msgstr "E11: Virheellinen komentorivi-ikkuna, <CR> suorittaa, Ctrl C lopettaa"
-#: ../globals.h:1002
msgid "E12: Command not allowed from exrc/vimrc in current dir or tag search"
msgstr ""
-"E12: Komentoa ei tueta exrc:ss tai vimrc:ss tss hakemistossa tai "
-"tgihaussa"
+"E12: Komentoa ei tueta exrc:ssä tai vimrc:ssä tässä hakemistossa tai "
+"tägihaussa"
-#: ../globals.h:1003
msgid "E171: Missing :endif"
msgstr "E171: :endif puuttuu"
-#: ../globals.h:1004
msgid "E600: Missing :endtry"
msgstr "E600: :endtry puuttuu"
-#: ../globals.h:1005
msgid "E170: Missing :endwhile"
msgstr "E170: :endwhile puuttuu"
-#: ../globals.h:1006
msgid "E170: Missing :endfor"
msgstr "E170: :endfor puuttuu"
-#: ../globals.h:1007
msgid "E588: :endwhile without :while"
msgstr "E588: :endwhile ilman komentoa :while"
-#: ../globals.h:1008
msgid "E588: :endfor without :for"
msgstr "E588: :endfor ilman komentoa :for"
-#: ../globals.h:1009
msgid "E13: File exists (add ! to override)"
-msgstr "E13: Tiedosto on jo olemassa (lis ! ohittaaksesi)"
+msgstr "E13: Tiedosto on jo olemassa (lisää ! ohittaaksesi)"
-#: ../globals.h:1010
msgid "E472: Command failed"
-msgstr "E472: Komento eponnistui"
+msgstr "E472: Komento epäonnistui"
-#: ../globals.h:1011
msgid "E473: Internal error"
-msgstr "E473: Sisinen virhe"
+msgstr "E473: Sisäinen virhe"
-#: ../globals.h:1012
msgid "Interrupted"
msgstr "Keskeytetty"
-#: ../globals.h:1013
msgid "E14: Invalid address"
msgstr "E14: Virheellinen osoite"
-#: ../globals.h:1014
msgid "E474: Invalid argument"
msgstr "E474: Virheellinen argumentti"
-#: ../globals.h:1015
#, c-format
msgid "E475: Invalid argument: %s"
msgstr "E475: Virheellinen argumentti: %s"
-#: ../globals.h:1016
#, c-format
msgid "E15: Invalid expression: %s"
msgstr "E15: Virheellinen ilmaus: %s"
-#: ../globals.h:1017
msgid "E16: Invalid range"
msgstr "E16: Virheellinen arvoalue"
-#: ../globals.h:1018
msgid "E476: Invalid command"
msgstr "E476: Virheellinen komento"
-#: ../globals.h:1019
#, c-format
msgid "E17: \"%s\" is a directory"
msgstr "E17: %s on hakemisto"
-#: ../globals.h:1020
#, fuzzy
-msgid "E900: Invalid job id"
-msgstr "E49: Virheellinen vierityskoko"
+#~ msgid "E900: Invalid job id"
+#~ msgstr "E916: ei ole job"
-#: ../globals.h:1021
-msgid "E901: Job table is full"
-msgstr ""
+#~ msgid "E901: Job table is full"
+#~ msgstr ""
+
+#, fuzzy, c-format
+#~ msgid "E903: Process failed to start: %s: \"%s\""
+#~ msgstr "E852: Lapsiprosesi ei voinut käynnistää käyttöliittymää"
+
+#, fuzzy
+#~ msgid "E904: Job is not connected to a pty"
+#~ msgstr "E902: Ei voi yhdistää porttiin"
-#: ../globals.h:1024
#, c-format
msgid "E364: Library call failed for \"%s()\""
-msgstr "E364: Kirjastukutsu %s() eponnistui"
+msgstr "E364: Kirjastukutsu %s() epäonnistui"
+
+#, fuzzy, c-format
+#~ msgid "E739: Cannot create directory %s: %s"
+#~ msgstr "E739: hakemistoa ei voi luoda: %s"
-#: ../globals.h:1026
msgid "E19: Mark has invalid line number"
-msgstr "E19: Merkill on virheellinen rivinumero"
+msgstr "E19: Merkillä on virheellinen rivinumero"
-#: ../globals.h:1027
msgid "E20: Mark not set"
-msgstr "E20: Merkki ei asetettu"
+msgstr "E20: Merkkiä ei asetettu"
-#: ../globals.h:1029
msgid "E21: Cannot make changes, 'modifiable' is off"
-msgstr "E21: Ei voi tehd muutoksia, modifiable on pois plt"
+msgstr "E21: Ei voi tehdä muutoksia, modifiable on pois päältä"
-#: ../globals.h:1030
msgid "E22: Scripts nested too deep"
-msgstr "E22: Liian monta tasoa skripteiss"
+msgstr "E22: Liian monta tasoa skripteissä"
-#: ../globals.h:1031
msgid "E23: No alternate file"
msgstr "E23: Eo vaihtoehtoista tiedostoa"
-#: ../globals.h:1032
msgid "E24: No such abbreviation"
-msgstr "E24: Lyhennett ei ole"
+msgstr "E24: Lyhennettä ei ole"
-#: ../globals.h:1033
msgid "E477: No ! allowed"
msgstr "E477: ! ei sallittu"
-#: ../globals.h:1035
-msgid "E25: Nvim does not have a built-in GUI"
-msgstr "E25: GUIta ei voi kytt, koska sit ei knnetty mukaan"
+#~ msgid "E25: Nvim does not have a built-in GUI"
+#~ msgstr ""
-#: ../globals.h:1036
#, c-format
msgid "E28: No such highlight group name: %s"
-msgstr "E28: Korostusryhm ei ole nimell: %s"
+msgstr "E28: Korostusryhmää ei ole nimellä: %s"
-#: ../globals.h:1037
msgid "E29: No inserted text yet"
-msgstr "E29: Teksti ei ole sytetty viel"
+msgstr "E29: Tekstiä ei ole syötetty vielä"
-#: ../globals.h:1038
msgid "E30: No previous command line"
-msgstr "E30: Ei edellist komentorivi"
+msgstr "E30: Ei edellistä komentoriviä"
-#: ../globals.h:1039
msgid "E31: No such mapping"
msgstr "E31: Kuvausta ei ole"
-#: ../globals.h:1040
msgid "E479: No match"
-msgstr "E479: Ei tsm"
+msgstr "E479: Ei täsmää"
-#: ../globals.h:1041
#, c-format
msgid "E480: No match: %s"
-msgstr "E480: Ei tsm: %s"
+msgstr "E480: Ei tsämää: %s"
-#: ../globals.h:1042
msgid "E32: No file name"
-msgstr "E32: Ei tiedostonime"
+msgstr "E32: Ei tiedostonimeä"
-#: ../globals.h:1044
msgid "E33: No previous substitute regular expression"
-msgstr "E33: Ei edellist korvausta snnlliselle ilmaukselle"
+msgstr "E33: Ei edellistä korvausta säännölliselle ilmaukselle"
-#: ../globals.h:1045
msgid "E34: No previous command"
-msgstr "E34: Ei edellist komentoa"
+msgstr "E34: Ei edellistä komentoa"
-#: ../globals.h:1046
msgid "E35: No previous regular expression"
-msgstr "E35: Ei edellist snnllist ilmausta"
+msgstr "E35: Ei edellistä säännöllistä ilmausta"
-#: ../globals.h:1047
msgid "E481: No range allowed"
msgstr "E481: Arvoalue ei sallittu"
-#: ../globals.h:1048
msgid "E36: Not enough room"
-msgstr "E36: Tila ei riit"
+msgstr "E36: Tila ei riitä"
-#: ../globals.h:1049
-#, c-format
-msgid "E482: Can't create file %s"
-msgstr "E482: Tiedostoa %s ei voi luoda"
-
-#: ../globals.h:1050
msgid "E483: Can't get temp file name"
-msgstr "E483: vliaikaistiedoston nime ei saada selville"
+msgstr "E483: väliaikaistiedoston nimeä ei saada selville"
-#: ../globals.h:1051
#, c-format
msgid "E484: Can't open file %s"
msgstr "E484: Ei voi avata tiedostoa %s"
-#: ../globals.h:1052
#, c-format
msgid "E485: Can't read file %s"
msgstr "E485: Ei voi lukea tiedostoa %s"
-#: ../globals.h:1054
msgid "E37: No write since last change (add ! to override)"
msgstr ""
-"E37: Viimeisen muutoksen jlkeen ei ole kirjoitettu (lis ! ohittaaksesi)"
+"E37: Viimeisen muutoksen jälkeen ei ole kirjoitettu (lisää ! ohittaaksesi)"
-#: ../globals.h:1055
-#, fuzzy
msgid "E37: No write since last change"
-msgstr "[Viimeisint muutosta ei ole kirjoitettu]\n"
+msgstr "E37: Viimeisimmän muutoksen jälkeen ei ole kirjoitettu mitään"
-#: ../globals.h:1056
msgid "E38: Null argument"
msgstr "E38: Null-argumentti"
-#: ../globals.h:1057
msgid "E39: Number expected"
-msgstr "E39: Pit olla numero"
+msgstr "E39: Pitää olla numero"
-#: ../globals.h:1058
#, c-format
msgid "E40: Can't open errorfile %s"
msgstr "E40: virhetiedostoa %s ei voi avata"
-#: ../globals.h:1059
msgid "E41: Out of memory!"
msgstr "E41: Muisti loppui"
-#: ../globals.h:1060
msgid "Pattern not found"
-msgstr "Kuviota ei lydy"
+msgstr "Kuviota ei löydy"
-#: ../globals.h:1061
#, c-format
msgid "E486: Pattern not found: %s"
-msgstr "E486: Kuviota ei lydy: %s"
+msgstr "E486: Kuviota ei löydy: %s"
-#: ../globals.h:1062
msgid "E487: Argument must be positive"
-msgstr "E487: Argumentin pit olla positiivinen"
+msgstr "E487: Argumentin pitää olla positiivinen"
-#: ../globals.h:1064
msgid "E459: Cannot go back to previous directory"
-msgstr "E459: Ei voi siirty edelliseen hakemistoon"
+msgstr "E459: Ei voi siirtyä edelliseen hakemistoon"
# ;-)
-#: ../globals.h:1066
msgid "E42: No Errors"
-msgstr "E42: Ei virheit"
+msgstr "E42: Ei virheitä"
-#: ../globals.h:1067
msgid "E776: No location list"
msgstr "E776: Ei sijaintilistaa"
-#: ../globals.h:1068
msgid "E43: Damaged match string"
-msgstr "E43: Viallinen tsmysmerkkijono"
+msgstr "E43: Viallinen täsmäysmerkkijono"
-#: ../globals.h:1069
msgid "E44: Corrupted regexp program"
msgstr "E44: Viallinen regexp-ohjelma"
-#: ../globals.h:1071
msgid "E45: 'readonly' option is set (add ! to override)"
-msgstr "E45: readonly asetettu (lis ! ohittaaksesi)"
-
-#: ../globals.h:1073
-#, c-format
-msgid "E46: Cannot change read-only variable \"%s\""
-msgstr "E46: Kirjoitussuojattua muuttujaa %s ei voi muuttaa"
-
-#: ../globals.h:1075
-#, c-format
-msgid "E794: Cannot set variable in the sandbox: \"%s\""
-msgstr "E794: Muuttujaa ei voi asettaa hiekkalaatikossa: %s"
+msgstr "E45: readonly asetettu (lisää ! ohittaaksesi)"
-#: ../globals.h:1076
msgid "E47: Error while reading errorfile"
msgstr "E47: Virhe virhetiedostoa luettaessa"
-#: ../globals.h:1078
msgid "E48: Not allowed in sandbox"
msgstr "E48: Ei sallittu hiekkalaatikossa"
-#: ../globals.h:1080
msgid "E523: Not allowed here"
-msgstr "E523: Ei sallittu tll"
+msgstr "E523: Ei sallittu täällä"
-#: ../globals.h:1082
msgid "E359: Screen mode setting not supported"
-msgstr "E359: Nytttila-asetus ei tuettu"
+msgstr "E359: Näyttötila-asetus ei tuettu"
-#: ../globals.h:1083
msgid "E49: Invalid scroll size"
msgstr "E49: Virheellinen vierityskoko"
-#: ../globals.h:1084
msgid "E91: 'shell' option is empty"
-msgstr "E91: shell-asetus on tyhj"
+msgstr "E91: shell-asetus on tyhjä"
-#: ../globals.h:1085
msgid "E255: Couldn't read in sign data!"
msgstr "E255: Merkkidatan luku ei onnistu"
-#: ../globals.h:1086
msgid "E72: Close error on swap file"
msgstr "E72: Swap-tiedoston sulkemisvirhe"
-#: ../globals.h:1087
msgid "E73: tag stack empty"
-msgstr "E73: tgipino tyhj"
+msgstr "E73: tägipino tyhjä"
-#: ../globals.h:1088
msgid "E74: Command too complex"
msgstr "E74: Liian monimutkainen komento"
-#: ../globals.h:1089
msgid "E75: Name too long"
-msgstr "E75: Liian pitk nimi"
+msgstr "E75: Liian pitkä nimi"
-#: ../globals.h:1090
msgid "E76: Too many ["
msgstr "E76: Liian monta [:a"
-#: ../globals.h:1091
msgid "E77: Too many file names"
-msgstr "E77: Liikaa tiedostonimi"
+msgstr "E77: Liikaa tiedostonimiä"
-#: ../globals.h:1092
msgid "E488: Trailing characters"
-msgstr "E488: Ylimrisi merkkej perss"
+msgstr "E488: Ylimääräisiä merkkejä perässä"
-#: ../globals.h:1093
msgid "E78: Unknown mark"
msgstr "E78: Tuntematon merkki"
-#: ../globals.h:1094
msgid "E79: Cannot expand wildcards"
msgstr "E79: Jokerimerkkien avaus ei onnistu"
-#: ../globals.h:1096
msgid "E591: 'winheight' cannot be smaller than 'winminheight'"
msgstr "E591: winheight ei voi olla pienempi kuin winminheight"
-#: ../globals.h:1098
msgid "E592: 'winwidth' cannot be smaller than 'winminwidth'"
msgstr "E592: winwidth ei voi olla pienempi kuin winminwidth"
-#: ../globals.h:1099
msgid "E80: Error while writing"
msgstr "E80: Kirjoitusvirhe"
-#: ../globals.h:1100
msgid "Zero count"
msgstr "Nollalaskuri"
-#: ../globals.h:1101
msgid "E81: Using <SID> not in a script context"
msgstr "E81: <SID> skriptin ulkopuolella"
-#: ../globals.h:1102
#, c-format
msgid "E685: Internal error: %s"
-msgstr "E685: Sisinen virhe: %s"
+msgstr "E685: Sisäinen virhe: %s"
-#: ../globals.h:1104
msgid "E363: pattern uses more memory than 'maxmempattern'"
-msgstr "E363: kuvio kytt enemmn muistia kuin maxmempattern on"
+msgstr "E363: kuvio käyttää enemmän muistia kuin maxmempattern on"
-#: ../globals.h:1105
msgid "E749: empty buffer"
-msgstr "E749: tyhj puskuri"
+msgstr "E749: tyhjä puskuri"
+
+#, fuzzy, c-format
+#~ msgid "E86: Buffer %<PRId64> does not exist"
+#~ msgstr "E86: Puskuria %ld ei ole"
-#: ../globals.h:1108
msgid "E682: Invalid search pattern or delimiter"
msgstr "E682: Virheellinen hakulauseke tai erotin"
-#: ../globals.h:1109
msgid "E139: File is loaded in another buffer"
msgstr "E139: Tiedosto on ladattu toiseen puskuriin"
-#: ../globals.h:1110
#, c-format
msgid "E764: Option '%s' is not set"
msgstr "E764: Asetus %s on asettamatta"
-#: ../globals.h:1111
-#, fuzzy
msgid "E850: Invalid register name"
-msgstr "E354: Virheellinen rekisterin nimi: %s"
+msgstr "E850: Virheellinen rekisterin nimi"
+
+#, c-format
+msgid "E919: Directory not found in '%s': \"%s\""
+msgstr "E919: Hakemisto puuttuu kohteesta %s: %s"
+
+msgid "E519: Option not supported"
+msgstr "E519: Asetusta ei tueta"
+
+#, fuzzy
+#~ msgid "E856: Filename too long"
+#~ msgstr "E75: Liian pitkä nimi"
+
+msgid "E806: using Float as a String"
+msgstr "E806: Float ei käy merkkijonosta"
-#: ../globals.h:1114
msgid "search hit TOP, continuing at BOTTOM"
-msgstr "haku psi ALKUUN, jatketaan LOPUSTA"
+msgstr "haku pääsi ALKUUN, jatketaan LOPUSTA"
-#: ../globals.h:1115
msgid "search hit BOTTOM, continuing at TOP"
-msgstr "haku psi LOPPUUN, jatketaan ALUSTA"
+msgstr "haku pääsi LOPPUUN, jatketaan ALUSTA"
-#: ../hardcopy.c:240
msgid "E550: Missing colon"
msgstr "E550: kaksoispiste puuttuu"
-#: ../hardcopy.c:252
msgid "E551: Illegal component"
msgstr "E551: Virheellinen komponentti"
-#: ../hardcopy.c:259
msgid "E552: digit expected"
-msgstr "E552: pitisi olla numero"
+msgstr "E552: pitäisi olla numero"
-#: ../hardcopy.c:473
#, c-format
msgid "Page %d"
msgstr "Sivu %d"
-#: ../hardcopy.c:597
msgid "No text to be printed"
-msgstr "Ei teksti tulostettavaksi"
+msgstr "Ei tekstiä tulostettavaksi"
-#: ../hardcopy.c:668
-#, c-format
-msgid "Printing page %d (%d%%)"
-msgstr "Tulostetaan sivua %d (%d %%)"
+#, fuzzy, c-format
+#~ msgid "Printing page %d (%zu%%)"
+#~ msgstr "Tulostetaan sivua %d (%d %%)"
-#: ../hardcopy.c:680
#, c-format
msgid " Copy %d of %d"
msgstr " Kopio %d/%d"
-#: ../hardcopy.c:733
#, c-format
msgid "Printed: %s"
msgstr "Tulostettu: %s"
-#: ../hardcopy.c:740
msgid "Printing aborted"
msgstr "Tulostus peruttu"
-#: ../hardcopy.c:1365
msgid "E455: Error writing to PostScript output file"
-msgstr "E455: Virhe kirjoitettaessa PostScripti tiedostoon"
+msgstr "E455: Virhe kirjoitettaessa PostScriptiä tiedostoon"
-#: ../hardcopy.c:1747
#, c-format
msgid "E624: Can't open file \"%s\""
msgstr "E624: Ei voi avata tiedostoa %s"
-#: ../hardcopy.c:1756 ../hardcopy.c:2470
#, c-format
msgid "E457: Can't read PostScript resource file \"%s\""
msgstr "E457: Ei voi lukea PostScript-resurssitiedostoa %s"
-#: ../hardcopy.c:1772
#, c-format
msgid "E618: file \"%s\" is not a PostScript resource file"
msgstr "E618: tiedosto %s ei ole PostScript-resurssitiedosto"
-#: ../hardcopy.c:1788 ../hardcopy.c:1805 ../hardcopy.c:1844
#, c-format
msgid "E619: file \"%s\" is not a supported PostScript resource file"
msgstr "E619: tiedosto %s ei ole tuettu PostScript-resurssitiedosto"
-#: ../hardcopy.c:1856
#, c-format
msgid "E621: \"%s\" resource file has wrong version"
-msgstr "E621: resurssitiedoston %s versio on vr"
+msgstr "E621: resurssitiedoston %s versio on väärä"
-#: ../hardcopy.c:2225
msgid "E673: Incompatible multi-byte encoding and character set."
-msgstr "E673: Tukematon monitvauinen merkistkoodaus ja merkist."
+msgstr "E673: Tukematon monitvauinen merkistökoodaus ja merkistö."
-#: ../hardcopy.c:2238
msgid "E674: printmbcharset cannot be empty with multi-byte encoding."
-msgstr "E674: printmbcharset ei voi olla tyhj monitavuiselle koodaukselle."
+msgstr "E674: printmbcharset ei voi olla tyhjä monitavuiselle koodaukselle."
-#: ../hardcopy.c:2254
msgid "E675: No default font specified for multi-byte printing."
msgstr "E675: Ei oletusfonttia monitavuiseen tulostukseen"
-#: ../hardcopy.c:2426
msgid "E324: Can't open PostScript output file"
msgstr "E324: PostScript-tulostetiedoston avaus ei onnistu"
-#: ../hardcopy.c:2458
#, c-format
msgid "E456: Can't open file \"%s\""
msgstr "E456: Tiedoston %s avaus ei onnistu"
-#: ../hardcopy.c:2583
msgid "E456: Can't find PostScript resource file \"prolog.ps\""
-msgstr "E456: PostScript-resurssitiedostoa prolog.ps ei lydy"
+msgstr "E456: PostScript-resurssitiedostoa prolog.ps ei löydy"
-#: ../hardcopy.c:2593
msgid "E456: Can't find PostScript resource file \"cidfont.ps\""
-msgstr "E456: PostScript-resurssitiedostoa cidfont.ps ei lydy"
+msgstr "E456: PostScript-resurssitiedostoa cidfont.ps ei löydy"
-#: ../hardcopy.c:2622 ../hardcopy.c:2639 ../hardcopy.c:2665
#, c-format
msgid "E456: Can't find PostScript resource file \"%s.ps\""
-msgstr "E456: Postscript-resurssitiedosta %s.ps ei lydy"
+msgstr "E456: Postscript-resurssitiedosta %s.ps ei löydy"
-#: ../hardcopy.c:2654
#, c-format
msgid "E620: Unable to convert to print encoding \"%s\""
msgstr "E620: Tulostuskoodaukseen %s muunto ei onnistu"
-#: ../hardcopy.c:2877
msgid "Sending to printer..."
-msgstr "Lhetetn tulostimelle..."
+msgstr "Lähetetään tulostimelle..."
-#: ../hardcopy.c:2881
msgid "E365: Failed to print PostScript file"
-msgstr "E365: PostScript-tiedoston tulostus eponnistui"
+msgstr "E365: PostScript-tiedoston tulostus epäonnistui"
-#: ../hardcopy.c:2883
msgid "Print job sent."
-msgstr "Tulostusty lhetetty."
+msgstr "Tulostustyö lähetetty."
-#: ../if_cscope.c:85
msgid "Add a new database"
-msgstr "Lis uusi tietokanta"
+msgstr "Lisää uusi tietokanta"
-#: ../if_cscope.c:87
msgid "Query for a pattern"
msgstr "Hae kuviota"
-#: ../if_cscope.c:89
msgid "Show this message"
-msgstr "Nyt tm viesti"
+msgstr "Näytä tämä viesti"
-#: ../if_cscope.c:91
msgid "Kill a connection"
msgstr "Tapa yhteys"
-#: ../if_cscope.c:93
msgid "Reinit all connections"
msgstr "Alusta uudelleen yhteydet"
-#: ../if_cscope.c:95
msgid "Show connections"
-msgstr "Nyt yhteydet"
+msgstr "Näytä yhteydet"
-#: ../if_cscope.c:101
#, c-format
msgid "E560: Usage: cs[cope] %s"
-msgstr "E560: Kytt: cs[cope] %s"
+msgstr "E560: Käyttö: cs[cope] %s"
-#: ../if_cscope.c:225
msgid "This cscope command does not support splitting the window.\n"
-msgstr "Tm cscope-komento ei tue ikkunan jakamista.\n"
+msgstr "Tämä cscope-komento ei tue ikkunan jakamista.\n"
-#: ../if_cscope.c:266
msgid "E562: Usage: cstag <ident>"
-msgstr "E562: Kytt: cstag <ident>"
+msgstr "E562: Käyttö: cstag <ident>"
-#: ../if_cscope.c:313
msgid "E257: cstag: tag not found"
-msgstr "E257: cstag: tgia ei lydy"
+msgstr "E257: cstag: tägia ei löydy"
-#: ../if_cscope.c:461
#, c-format
msgid "E563: stat(%s) error: %d"
msgstr "E563: stat(%s)-virhe: %d"
-#: ../if_cscope.c:551
#, c-format
msgid "E564: %s is not a directory or a valid cscope database"
-msgstr "E564: %s ei ole hakemisto eik cscope-tietokanta"
+msgstr "E564: %s ei ole hakemisto eikä cscope-tietokanta"
-#: ../if_cscope.c:566
#, c-format
msgid "Added cscope database %s"
-msgstr "Listty cscope-tietokanta %s"
+msgstr "Lisätty cscope-tietokanta %s"
-#: ../if_cscope.c:616
-#, c-format
-msgid "E262: error reading cscope connection %<PRId64>"
-msgstr "E262: Virhe luettaessa cscope-yhteytt %<PRId64>"
+#, fuzzy, c-format
+#~ msgid "E262: error reading cscope connection %<PRIu64>"
+#~ msgstr "E262: Virhe luettaessa cscope-yhteyttä %ld"
-#: ../if_cscope.c:711
msgid "E561: unknown cscope search type"
msgstr "E561: tuntematon cscope-hakutyyppi"
-#: ../if_cscope.c:752 ../if_cscope.c:789
msgid "E566: Could not create cscope pipes"
msgstr "E566: Ei voitu luoda cscope-putkia"
-#: ../if_cscope.c:767
msgid "E622: Could not fork for cscope"
msgstr "E622: Ei voitu haarauttaa cscopea"
-#: ../if_cscope.c:849
-#, fuzzy
msgid "cs_create_connection setpgid failed"
-msgstr "cs_create_connection eponnistui"
+msgstr "cs_create_connection setpgid epäonnistui"
-#: ../if_cscope.c:853 ../if_cscope.c:889
msgid "cs_create_connection exec failed"
-msgstr "cs_create_connection eponnistui"
+msgstr "cs_create_connection epäonnistui"
-#: ../if_cscope.c:863 ../if_cscope.c:902
msgid "cs_create_connection: fdopen for to_fp failed"
-msgstr "cs_create_connection: fdopen to_fp eponnistui"
+msgstr "cs_create_connection: fdopen to_fp epäonnistui"
-#: ../if_cscope.c:865 ../if_cscope.c:906
msgid "cs_create_connection: fdopen for fr_fp failed"
-msgstr "cs_create_connection: fdopen fr_fp eponnistui"
+msgstr "cs_create_connection: fdopen fr_fp epäonnistui"
-#: ../if_cscope.c:890
msgid "E623: Could not spawn cscope process"
-msgstr "E623: Cscope-prosessin luonti eponnistui"
+msgstr "E623: Cscope-prosessin luonti epäonnistui"
-#: ../if_cscope.c:932
msgid "E567: no cscope connections"
-msgstr "E567: ei cscope-yhteyksi"
+msgstr "E567: ei cscope-yhteyksiä"
-#: ../if_cscope.c:1009
#, c-format
msgid "E469: invalid cscopequickfix flag %c for %c"
msgstr "E469: virheellinen cscopequickfix-asetus %c kohteelle %c"
-#: ../if_cscope.c:1058
#, c-format
msgid "E259: no matches found for cscope query %s of %s"
-msgstr "E259: ei tsmyksi cscope-hakuun %s/%s"
+msgstr "E259: ei täsmäyksiä cscope-hakuun %s/%s"
-#: ../if_cscope.c:1142
msgid "cscope commands:\n"
msgstr "cscope-komennot:\n"
-#: ../if_cscope.c:1150
#, c-format
msgid "%-5s: %s%*s (Usage: %s)"
-msgstr "%-5s: %s%*s (Kytt: %s)"
+msgstr "%-5s: %s%*s (Käyttö: %s)"
-#: ../if_cscope.c:1155
-#, fuzzy
msgid ""
"\n"
+" a: Find assignments to this symbol\n"
" c: Find functions calling this function\n"
" d: Find functions called by this function\n"
" e: Find this egrep pattern\n"
@@ -3246,40 +3092,36 @@ msgid ""
" t: Find this text string\n"
msgstr ""
"\n"
-" c: Etsi tt funktiota kutsuvat funktiot\n"
-" d: Etsi tmn funktion kutsumat funktiot\n"
-" e: Etsi tm egrep-lauseke\n"
-" f: Find tm tiedosto\n"
-" g: Etsi tm mritys\n"
-" i: Etsi tiedostoja jotka #inkluudaavat tmn\n"
-" s: Etsi tm C-symboli\n"
+" a: Etsi sijotukset tähän symboliin\n"
+" c: Etsi tätä funktiota kutsuvat funktiot\n"
+" d: Etsi tämän funktion kutsumat funktiot\n"
+" e: Etsi tämä egrep-lauseke\n"
+" f: Etsi tämä tiedosto\n"
+" g: Etsi tämä määritys\n"
+" i: Etsi tiedostoja jotka #inkluudaavat tämän\n"
+" s: Etsi tämä C-symboli\n"
" t: Etsi sijoitukset muuttujaan \n"
-#: ../if_cscope.c:1226
msgid "E568: duplicate cscope database not added"
-msgstr "E568: kaksoiskappaletta cscope-tietokannasta ei listty"
+msgstr "E568: kaksoiskappaletta cscope-tietokannasta ei lisätty"
-#: ../if_cscope.c:1335
#, c-format
msgid "E261: cscope connection %s not found"
msgstr "E261: cscope-yhteys %s puuttuu"
-#: ../if_cscope.c:1364
#, c-format
msgid "cscope connection %s closed"
msgstr "cscope-yhteys %s on katkaistu"
#. should not reach here
-#: ../if_cscope.c:1486
msgid "E570: fatal error in cs_manage_matches"
msgstr "E570: kriittinen virhe cs_manage_matches-funktiossa"
-#: ../if_cscope.c:1693
#, c-format
msgid "Cscope tag: %s"
-msgstr "Cscope-tgi: %s"
+msgstr "Cscope-tägi: %s"
-#: ../if_cscope.c:1711
+#. Column headers for match number, line number and filename.
msgid ""
"\n"
" # line"
@@ -3287,326 +3129,272 @@ msgstr ""
"\n"
" # rivi"
-#: ../if_cscope.c:1713
msgid "filename / context / line\n"
msgstr "tiedosto / konteksti / rivi\n"
-#: ../if_cscope.c:1809
#, c-format
msgid "E609: Cscope error: %s"
msgstr "E609: Cscope-virhe: %s"
-#: ../if_cscope.c:2053
msgid "All cscope databases reset"
msgstr "Kaikki cscope-tietokannat nollattu"
-#: ../if_cscope.c:2123
msgid "no cscope connections\n"
-msgstr "ei cscope-yhteyksi\n"
+msgstr "ei cscope-yhteyksiä\n"
-#: ../if_cscope.c:2126
msgid " # pid database name prepend path\n"
-msgstr " # pid tietokanta lisyspolku\n"
+msgstr " # pid tietokanta lisäyspolku\n"
+
+#. Error messages
+msgid "Argument missing after"
+msgstr "Argumentti puuttuu kohdasta"
+
+msgid "Garbage after option argument"
+msgstr "Roskaa argumentin perässä"
-#: ../main.c:144
msgid "Unknown option argument"
msgstr "Tuntematon asetusargumentti"
-#: ../main.c:146
msgid "Too many edit arguments"
msgstr "Liikaa muokkausargumentteja"
-#: ../main.c:148
-msgid "Argument missing after"
-msgstr "Argumentti puuttuu kohdasta"
-
-#: ../main.c:150
-msgid "Garbage after option argument"
-msgstr "Roskaa argumentin perss"
-
-#: ../main.c:152
msgid "Too many \"+command\", \"-c command\" or \"--cmd command\" arguments"
msgstr "Liikaa +komentoja, -c-komentoja tai --cmd-komentoja"
-#: ../main.c:154
-msgid "Invalid argument for"
-msgstr "Vr argumentti valitsimelle"
-
-#: ../main.c:294
-#, c-format
-msgid "%d files to edit\n"
-msgstr "%d tiedostoa muokattavana\n"
-
-#: ../main.c:1342
msgid "Attempt to open script file again: \""
msgstr "Yritettiin avata skriptitiedostoa uudestaan:"
-#: ../main.c:1350
msgid "Cannot open for reading: \""
msgstr "Ei voi avata luettavaksi: "
-#: ../main.c:1393
msgid "Cannot open for script output: \""
msgstr "Ei voi avata skriptin tulostetta varten: "
-#: ../main.c:1622
msgid "Vim: Warning: Output is not to a terminal\n"
msgstr "Vim: Varoitus: Tuloste ei mene terminaalille\n"
-#: ../main.c:1624
msgid "Vim: Warning: Input is not from a terminal\n"
-msgstr "Vim: Varoitus: Syte ei tule terminaalilta\n"
+msgstr "Vim: Varoitus: Syöte ei tule terminaalilta\n"
#. just in case..
-#: ../main.c:1891
msgid "pre-vimrc command line"
msgstr "esi-vimrc-komentorivi"
-#: ../main.c:1964
#, c-format
msgid "E282: Cannot read from \"%s\""
msgstr "E282: Ei voida lukea kohteesta %s"
-#: ../main.c:2149
+#, fuzzy
msgid ""
"\n"
-"More info with: \"vim -h\"\n"
+"More info with \""
msgstr ""
"\n"
-"Listietoja: \"vim -h\"\n"
-
-#: ../main.c:2178
-msgid "[file ..] edit specified file(s)"
-msgstr "[tiedosto ..] muokkaa tiedostoja"
-
-#: ../main.c:2179
-msgid "- read text from stdin"
-msgstr "- lue vakiosytteest"
+"Lisätietoja: \"vim -h\"\n"
-#: ../main.c:2180
-msgid "-t tag edit file where tag is defined"
-msgstr "-t tgi muokkaa tiedostoa tgist"
+#. kill us with CTRL-C here, if you like
+#, fuzzy
+#~ msgid "Usage:\n"
+#~ msgstr ""
+#~ "\n"
+#~ "\n"
+#~ "käyttö:"
-#: ../main.c:2181
-msgid "-q [errorfile] edit file with first error"
-msgstr "-q [virhetiedosto] muokkaa tiedostoa ensimmisest virheest"
+#, fuzzy
+#~ msgid " nvim [arguments] [file ...] Edit specified file(s)\n"
+#~ msgstr "[tiedosto ..] muokkaa tiedostoja"
-#: ../main.c:2187
-msgid ""
-"\n"
-"\n"
-"usage:"
-msgstr ""
-"\n"
-"\n"
-"kytt:"
+#, fuzzy
+#~ msgid " nvim [arguments] - Read text from stdin\n"
+#~ msgstr "- lue vakiosyötteestä"
-#: ../main.c:2189
-msgid " vim [arguments] "
-msgstr " vim [argumentit] "
+#, fuzzy
+#~ msgid " nvim [arguments] -t <tag> Edit file where tag is defined\n"
+#~ msgstr "-t tägi muokkaa tiedostoa tägistä"
-#: ../main.c:2193
-msgid ""
-"\n"
-" or:"
-msgstr ""
-"\n"
-" tai:"
+#, fuzzy
+#~ msgid " nvim [arguments] -q [errorfile] Edit file with first error\n"
+#~ msgstr "-q [virhetiedosto] muokkaa tiedostoa ensimmäisestä virheestä"
-#: ../main.c:2196
+#, fuzzy
msgid ""
"\n"
-"\n"
"Arguments:\n"
msgstr ""
"\n"
"\n"
"Argumentit:\n"
-#: ../main.c:2197
-msgid "--\t\t\tOnly file names after this"
-msgstr "--\t\t\tvain tiedostonimi tmn jlkeen"
-
-#: ../main.c:2199
-msgid "--literal\t\tDon't expand wildcards"
-msgstr "--literal\t\tl ksittele jokerimerkkej "
-
-#: ../main.c:2201
-msgid "-v\t\t\tVi mode (like \"vi\")"
-msgstr "-v\t\t\tVi-tila (kuten vill)"
+#, fuzzy
+#~ msgid " -- Only file names after this\n"
+#~ msgstr "--\t\t\tvain tiedostonimiä tämän jälkeen"
-#: ../main.c:2202
-msgid "-e\t\t\tEx mode (like \"ex\")"
-msgstr "-e\t\t\tEx-tila (kute exill)"
+#, fuzzy
+#~ msgid " --literal Don't expand wildcards\n"
+#~ msgstr "--literal\t\tÄlä käsittele jokerimerkkejä "
-#: ../main.c:2203
-msgid "-E\t\t\tImproved Ex mode"
-msgstr ""
+#, fuzzy
+#~ msgid " -e Ex mode\n"
+#~ msgstr " kahta tilaa varten "
-#: ../main.c:2204
-msgid "-s\t\t\tSilent (batch) mode (only for \"ex\")"
-msgstr "-s\t\t\tHiljainen (erajo)tila (vain exill)"
+#, fuzzy
+#~ msgid " -E Improved Ex mode\n"
+#~ msgstr " kahta tilaa varten "
-#: ../main.c:2205
-msgid "-d\t\t\tDiff mode (like \"vimdiff\")"
-msgstr "-d\t\t\tDiff-tila (kuten vimdiffill)"
+#, fuzzy
+#~ msgid " -s Silent (batch) mode (only for ex mode)\n"
+#~ msgstr "-s\t\t\tHiljainen (eräajo)tila (vain exillä)"
-#: ../main.c:2206
-msgid "-y\t\t\tEasy mode (like \"evim\", modeless)"
-msgstr "-y\t\t\tHelppokytttila (kuten evimiss, ilman tiloja)"
+#, fuzzy
+#~ msgid " -d Diff mode\n"
+#~ msgstr " kahta tilaa varten "
-#: ../main.c:2207
-msgid "-R\t\t\tReadonly mode (like \"view\")"
-msgstr "-R\t\t\tKirjoitussuojattu tila (kuten view'lla)"
+#, fuzzy
+#~ msgid " -R Read-only mode\n"
+#~ msgstr " kahta tilaa varten "
-#: ../main.c:2208
-msgid "-Z\t\t\tRestricted mode (like \"rvim\")"
-msgstr "-Z\t\t\tRajoitettu tila (kuten rvimill)"
+#, fuzzy
+#~ msgid " -Z Restricted mode\n"
+#~ msgstr " kahta tilaa varten "
-#: ../main.c:2209
-msgid "-m\t\t\tModifications (writing files) not allowed"
-msgstr "-m\t\t\tMuokkaukset (kirjoittaminen tiedostoon) pois kytst"
+#, fuzzy
+#~ msgid " -m Modifications (writing files) not allowed\n"
+#~ msgstr "-m\t\t\tMuokkaukset (kirjoittaminen tiedostoon) pois käytöstä"
-#: ../main.c:2210
-msgid "-M\t\t\tModifications in text not allowed"
-msgstr "-M\t\t\tTekstin muokkaus pois kytst"
+#, fuzzy
+#~ msgid " -M Modifications in text not allowed\n"
+#~ msgstr "-M\t\t\tTekstin muokkaus pois käytöstä"
-#: ../main.c:2211
-msgid "-b\t\t\tBinary mode"
-msgstr "-b\t\t\tBinritila"
+#, fuzzy
+#~ msgid " -b Binary mode\n"
+#~ msgstr " kahta tilaa varten "
-#: ../main.c:2212
-msgid "-l\t\t\tLisp mode"
-msgstr "-l\t\t\tLisp-tila"
+#, fuzzy
+#~ msgid " -l Lisp mode\n"
+#~ msgstr " kahta tilaa varten "
-#: ../main.c:2213
-msgid "-C\t\t\tCompatible with Vi: 'compatible'"
-msgstr "-C\t\t\tVi-yhteensopivuustila: compatible"
+#, fuzzy
+#~ msgid " -A Arabic mode\n"
+#~ msgstr " kahta tilaa varten "
-#: ../main.c:2214
-msgid "-N\t\t\tNot fully Vi compatible: 'nocompatible'"
-msgstr "-N\t\t\tEi Vi-yhteensopivuutta: nocompatible"
+#, fuzzy
+#~ msgid " -F Farsi mode\n"
+#~ msgstr " kahta tilaa varten "
-#: ../main.c:2215
-msgid "-V[N][fname]\t\tBe verbose [level N] [log messages to fname]"
-msgstr ""
-"-V[N][tnimi]\t\tMonisanainen tuloste [Taso N] [kirjoita tuloste tnimeen] "
+#, fuzzy
+#~ msgid " -H Hebrew mode\n"
+#~ msgstr " kahta tilaa varten "
-#: ../main.c:2216
-msgid "-D\t\t\tDebugging mode"
-msgstr "-D\t\t\tVianetsinttila"
+#, fuzzy
+#~ msgid " -V[N][file] Be verbose [level N][log messages to file]\n"
+#~ msgstr ""
+#~ "-V[N][tnimi]\t\tMonisanainen tuloste [Taso N] [kirjoita tuloste tnimeen] "
-#: ../main.c:2217
-msgid "-n\t\t\tNo swap file, use memory only"
-msgstr "-n\t\t\tEi swap-tiedostoja, kyt muistia"
+#, fuzzy
+#~ msgid " -D Debugging mode\n"
+#~ msgstr " kahta tilaa varten "
-#: ../main.c:2218
-msgid "-r\t\t\tList swap files and exit"
-msgstr "-r\t\t\tLuetteloi swap-tiedostot ja poistu"
+#, fuzzy
+#~ msgid " -n No swap file, use memory only\n"
+#~ msgstr "-n\t\t\tEi swap-tiedostoja, käytä muistia"
-#: ../main.c:2219
-msgid "-r (with file name)\tRecover crashed session"
-msgstr "-r (tiedostonimi)\tPalauta kaatunut sessio"
+#, fuzzy
+#~ msgid " -r, -L List swap files and exit\n"
+#~ msgstr "-r\t\t\tLuetteloi swap-tiedostot ja poistu"
-#: ../main.c:2220
-msgid "-L\t\t\tSame as -r"
-msgstr "-L\t\t\tkuten -r"
+#, fuzzy
+#~ msgid " -r <file> Recover crashed session\n"
+#~ msgstr "-r (tiedostonimi)\tPalauta kaatunut sessio"
-#: ../main.c:2221
-msgid "-A\t\t\tstart in Arabic mode"
-msgstr "-A\t\t\tkynnist arabia-tilassa"
+#, fuzzy
+#~ msgid " -u <vimrc> Use <vimrc> instead of the default\n"
+#~ msgstr "-u <vimrc>\t\tKäytä <vimrc>-tiedostoa .vimrc:iden sijasta"
-#: ../main.c:2222
-msgid "-H\t\t\tStart in Hebrew mode"
-msgstr "-H\t\t\tkynnist heprea-tilassa"
+#~ msgid " -i <shada> Use <shada> instead of the default\n"
+#~ msgstr ""
-#: ../main.c:2223
-msgid "-F\t\t\tStart in Farsi mode"
-msgstr "-F\t\t\tkynnist farsi-tilassa"
+#, fuzzy
+#~ msgid " --noplugin Don't load plugin scripts\n"
+#~ msgstr "--noplugin\t\tÄlä lataa liitännäisiä"
-#: ../main.c:2224
-msgid "-T <terminal>\tSet terminal type to <terminal>"
-msgstr "-T <terminaali>\tAseta terminaalin tyypiksi <terminaali>"
+#, fuzzy
+#~ msgid " -o[N] Open N windows (default: one for each file)\n"
+#~ msgstr "-o[N]\t\tAvaa N ikkunaa (oletus: yksi per tiedosto)"
-#: ../main.c:2225
-msgid "-u <vimrc>\t\tUse <vimrc> instead of any .vimrc"
-msgstr "-u <vimrc>\t\tKyt <vimrc>-tiedostoa .vimrc:iden sijasta"
+#, fuzzy
+#~ msgid " -O[N] Like -o but split vertically\n"
+#~ msgstr "-O[N]\t\tKuten -o, mutta jaa pystysuunnassa"
-#: ../main.c:2226
-msgid "--noplugin\t\tDon't load plugin scripts"
-msgstr "--noplugin\t\tl lataa liitnnisi"
+#, fuzzy
+#~ msgid " -p[N] Open N tab pages (default: one for each file)\n"
+#~ msgstr "-p[N]\t\tAvaa N välilehteä (oletus: yksi per tiedosto)"
-#: ../main.c:2227
-msgid "-p[N]\t\tOpen N tab pages (default: one for each file)"
-msgstr "-p[N]\t\tAvaa N vlilehte (oletus: yksi per tiedosto)"
+#, fuzzy
+#~ msgid " + Start at end of file\n"
+#~ msgstr " kahta tilaa varten "
-#: ../main.c:2228
-msgid "-o[N]\t\tOpen N windows (default: one for each file)"
-msgstr "-o[N]\t\tAvaa N ikkunaa (oletus: yksi per tiedosto)"
+#, fuzzy
+#~ msgid " +<linenum> Start at line <linenum>\n"
+#~ msgstr "+<rivi>\t\t\tAloita riviltä <rivi>"
-#: ../main.c:2229
-msgid "-O[N]\t\tLike -o but split vertically"
-msgstr "-O[N]\t\tKuten -o, mutta jaa pystysuunnassa"
+#~ msgid " +/<pattern> Start at first occurrence of <pattern>\n"
+#~ msgstr ""
-#: ../main.c:2230
-msgid "+\t\t\tStart at end of file"
-msgstr "+\t\t\tAloita tiedoston lopusta"
+#, fuzzy
+#~ msgid " --cmd <command> Execute <command> before loading any vimrc\n"
+#~ msgstr "--cmd <komento>\tSuorita <komento> ennen vimrc:iden latausta"
-#: ../main.c:2231
-msgid "+<lnum>\t\tStart at line <lnum>"
-msgstr "+<rivi>\t\t\tAloita rivilt <rivi>"
+#, fuzzy
+msgid ""
+" -c <command> Execute <command> after loading the first file\n"
+msgstr "-c <komento>\t\tSuorita <komento> ensimmäisen tiedoston latauduttua"
-#: ../main.c:2232
-msgid "--cmd <command>\tExecute <command> before loading any vimrc file"
-msgstr "--cmd <komento>\tSuorita <komento> ennen vimrc:iden latausta"
+#, fuzzy
+#~ msgid " -S <session> Source <session> after loading the first file\n"
+#~ msgstr "-S <sessio>\t\tLataa <sessio> ensimmäisen tiedoston latauduttua"
-#: ../main.c:2233
-msgid "-c <command>\t\tExecute <command> after loading the first file"
-msgstr "-c <komento>\t\tSuorita <komento> ensimmisen tiedoston latauduttua"
+#, fuzzy
+#~ msgid " -s <scriptin> Read Normal mode commands from <scriptin>\n"
+#~ msgstr "-s <skripti>\tLue normaalitilan komentoja <skripti>-tiedostosta"
-#: ../main.c:2235
-msgid "-S <session>\t\tSource file <session> after loading the first file"
-msgstr "-S <sessio>\t\tLataa <sessio> ensimmisen tiedoston latauduttua"
+#, fuzzy
+#~ msgid " -w <scriptout> Append all typed characters to <scriptout>\n"
+#~ msgstr "-w <skripti>\tLisää kirjoitetut komennot <skripti>-tiedostoon"
-#: ../main.c:2236
-msgid "-s <scriptin>\tRead Normal mode commands from file <scriptin>"
-msgstr "-s <skripti>\tLue normaalitilan komentoja <skripti>-tiedostosta"
+#, fuzzy
+#~ msgid " -W <scriptout> Write all typed characters to <scriptout>\n"
+#~ msgstr "-W <skripti>\tKirjoita komennot <skripti>-tiedostoon"
-#: ../main.c:2237
-msgid "-w <scriptout>\tAppend all typed commands to file <scriptout>"
-msgstr "-w <skripti>\tLis kirjoitetut komennot <skripti>-tiedostoon"
+#, fuzzy
+#~ msgid " --startuptime <file> Write startup timing messages to <file>\n"
+#~ msgstr "--startuptime <file>\tKirjoita käynnistysaikaviestit tiedostoon <file>"
-#: ../main.c:2238
-msgid "-W <scriptout>\tWrite all typed commands to file <scriptout>"
-msgstr "-W <skripti>\tKirjoita komennot <skripti>-tiedostoon"
+#~ msgid ""
+#~ " --api-info Dump API metadata serialized to msgpack and exit\n"
+#~ msgstr ""
-#: ../main.c:2240
-msgid "--startuptime <file>\tWrite startup timing messages to <file>"
-msgstr "--startuptime <file>\tKirjoita kynnistysaikaviestit tiedostoon <file>"
+#~ msgid " --embed Use stdin/stdout as a msgpack-rpc channel\n"
+#~ msgstr ""
-#: ../main.c:2242
-msgid "-i <viminfo>\t\tUse <viminfo> instead of .viminfo"
-msgstr "-i <viminfo>\t\tKyt <viminfo>-tiedostoa .viminfon sijaan"
+#~ msgid " --headless Don't start a user interface\n"
+#~ msgstr ""
-#: ../main.c:2243
-msgid "-h or --help\tPrint Help (this message) and exit"
-msgstr "-h tai --help\tTulosta ohje (tm viesti) ja lopeta"
+#, fuzzy
+#~ msgid " -v, --version Print version information and exit\n"
+#~ msgstr "--version\t\t\tTulosta versiotiedot ja lopeta"
-#: ../main.c:2244
-msgid "--version\t\tPrint version information and exit"
-msgstr "--version\t\t\tTulosta versiotiedot ja lopeta"
+#, fuzzy
+#~ msgid " -h, --help Print this help message and exit\n"
+#~ msgstr "-h tai --help\tTulosta ohje (tämä viesti) ja lopeta"
-#: ../mark.c:676
msgid "No marks set"
-msgstr "Ei asetettuja merkkej"
+msgstr "Ei asetettuja merkkejä"
-#: ../mark.c:678
#, c-format
msgid "E283: No marks matching \"%s\""
-msgstr "E283: Mikn merkki ei tsm ilmaukseen \"%s\""
+msgstr "E283: Mikään merkki ei täsmää ilmaukseen \"%s\""
#. Highlight title
-#: ../mark.c:687
msgid ""
"\n"
"mark line col file/text"
@@ -3615,7 +3403,6 @@ msgstr ""
"merkki rivi sarake tiedosto/teksti"
#. Highlight title
-#: ../mark.c:789
msgid ""
"\n"
" jump line col file/text"
@@ -3624,7 +3411,6 @@ msgstr ""
"hyppy rivi sarake tiedosto/teksti"
#. Highlight title
-#: ../mark.c:831
msgid ""
"\n"
"change line col text"
@@ -3632,138 +3418,85 @@ msgstr ""
"\n"
"muutos rivi sarake teksti"
-#: ../mark.c:1238
-msgid ""
-"\n"
-"# File marks:\n"
-msgstr ""
-"\n"
-"# Tiedoston merkit:\n"
-
-#. Write the jumplist with -'
-#: ../mark.c:1271
-msgid ""
-"\n"
-"# Jumplist (newest first):\n"
-msgstr ""
-"\n"
-"# Hyppylista (uusin ensiksi):\n"
-
-#: ../mark.c:1352
-msgid ""
-"\n"
-"# History of marks within files (newest to oldest):\n"
-msgstr ""
-"\n"
-"# Tiedostojen merkkien historia (uusimmasta vanhimpaan):\n"
-
-#: ../mark.c:1431
-msgid "Missing '>'"
-msgstr "> puuttuu"
-
-#: ../memfile.c:426
msgid "E293: block was not locked"
msgstr "E293: lohkoa ei ole lukittu"
-#: ../memfile.c:799
msgid "E294: Seek error in swap file read"
msgstr "E294: Hakuvirhe swap-tiedostoa luettaessa"
-#: ../memfile.c:803
msgid "E295: Read error in swap file"
msgstr "E295: Lukuvirhe swap-tiedostossa"
-#: ../memfile.c:849
msgid "E296: Seek error in swap file write"
msgstr "E296: Hakuvirhe swap-tiedostoa kirjoitettaessa"
-#: ../memfile.c:865
msgid "E297: Write error in swap file"
msgstr "E297: Kirjoitusvirhe swap-tiedostossa"
-#: ../memfile.c:1036
msgid "E300: Swap file already exists (symlink attack?)"
-msgstr "E300: Swaptiedosto on jo olemassa (symlink-hykkys?)"
+msgstr "E300: Swaptiedosto on jo olemassa (symlink-hyökkäys?)"
-#: ../memline.c:318
msgid "E298: Didn't get block nr 0?"
msgstr "E298: Lohko 0:aa ei saatu?"
-#: ../memline.c:361
msgid "E298: Didn't get block nr 1?"
-msgstr "E298: Lohko 1:t ei saatu?"
+msgstr "E298: Lohko 1:tä ei saatu?"
-#: ../memline.c:377
msgid "E298: Didn't get block nr 2?"
msgstr "E298: Lohko 2:ta ei saatu?"
#. could not (re)open the swap file, what can we do????
-#: ../memline.c:465
msgid "E301: Oops, lost the swap file!!!"
-msgstr "E301: Hups, swap-tiedosto hvisi!"
+msgstr "E301: Hups, swap-tiedosto hävisi!"
-#: ../memline.c:477
msgid "E302: Could not rename swap file"
msgstr "E302: Swap-tiedoston uudellennimeys ei onnistu"
-#: ../memline.c:554
#, c-format
msgid "E303: Unable to open swap file for \"%s\", recovery impossible"
msgstr "E303: Swap-tiedostoa %s ei voi avata, palautus ei onnistu"
-#: ../memline.c:666
msgid "E304: ml_upd_block0(): Didn't get block 0??"
msgstr "E304: ml_upd_block0(): Lohko 0:aa ei saatu?"
#. no swap files found
-#: ../memline.c:830
#, c-format
msgid "E305: No swap file found for %s"
msgstr "E305: Ei swap-tiedostoa tiedostolle %s"
-#: ../memline.c:839
msgid "Enter number of swap file to use (0 to quit): "
msgstr "Anna swap-tiedoston numero tai 0 lopettaaksesi: "
-#: ../memline.c:879
#, c-format
msgid "E306: Cannot open %s"
msgstr "E306: Ei voi avata tiedostoa %s"
-#: ../memline.c:897
msgid "Unable to read block 0 from "
msgstr "Ei voi lukea lohkoa 0 kohteesta "
-#: ../memline.c:900
msgid ""
"\n"
"Maybe no changes were made or Vim did not update the swap file."
msgstr ""
"\n"
-"Muutoksia ei tehty, tai Vim ei pivittnyt swap-tiedostoa."
+"Muutoksia ei tehty, tai Vim ei päivittänyt swap-tiedostoa."
-#: ../memline.c:909
msgid " cannot be used with this version of Vim.\n"
-msgstr " ei toimi tmn version Vimin kanssa.\n"
+msgstr " ei toimi tämän version Vimin kanssa.\n"
-#: ../memline.c:911
msgid "Use Vim version 3.0.\n"
-msgstr "Kyt Vimin versiota 3.0\n"
+msgstr "Käytä Vimin versiota 3.0\n"
-#: ../memline.c:916
#, c-format
msgid "E307: %s does not look like a Vim swap file"
msgstr "E307: %s ei ole Vimin swap-tiedosto"
-#: ../memline.c:922
msgid " cannot be used on this computer.\n"
-msgstr " ei toimi tll koneella.\n"
+msgstr " ei toimi tällä koneella.\n"
-#: ../memline.c:924
msgid "The file was created on "
msgstr "Tiedosto luotiin "
-#: ../memline.c:928
msgid ""
",\n"
"or the file has been damaged."
@@ -3771,100 +3504,78 @@ msgstr ""
",\n"
"tai tiedosto on vahingoittunut."
-#: ../memline.c:945
msgid " has been damaged (page size is smaller than minimum value).\n"
-msgstr " on vioittunut (sivun koko on vhimmisarvoa pienempi).\n"
+msgstr " on vioittunut (sivun koko on vähimmäisarvoa pienempi).\n"
-#: ../memline.c:974
#, c-format
msgid "Using swap file \"%s\""
-msgstr "Kytetn swap-tiedostoa %s"
+msgstr "Käytetään swap-tiedostoa %s"
-#: ../memline.c:980
#, c-format
msgid "Original file \"%s\""
-msgstr "Alkuperinen tiedosto %s"
+msgstr "Alkuperäinen tiedosto %s"
-#: ../memline.c:995
msgid "E308: Warning: Original file may have been changed"
-msgstr "E308: Varoitus: Alkuperist tiedostoa saattaa olla muutettu"
+msgstr "E308: Varoitus: Alkuperäistä tiedostoa saattaa olla muutettu"
-#: ../memline.c:1061
#, c-format
msgid "E309: Unable to read block 1 from %s"
msgstr "E309: Ei voitu lukea lohkoa 1 tiedostosta %s"
-#: ../memline.c:1065
msgid "???MANY LINES MISSING"
-msgstr "???PALJON RIVEJ PUUTTUU"
+msgstr "???PALJON RIVEJÄ PUUTTUU"
-#: ../memline.c:1076
msgid "???LINE COUNT WRONG"
-msgstr "???RIVIMR PIELESS"
+msgstr "???RIVIMÄÄRÄ PIELESSÄ"
-#: ../memline.c:1082
msgid "???EMPTY BLOCK"
-msgstr "???TYHJ LOHKO"
+msgstr "???TYHJÄ LOHKO"
-#: ../memline.c:1103
msgid "???LINES MISSING"
-msgstr "???RIVEJ PUUTTUU"
+msgstr "???RIVEJÄ PUUTTUU"
-#: ../memline.c:1128
#, c-format
msgid "E310: Block 1 ID wrong (%s not a .swp file?)"
-msgstr "E310: Lohon 1 tunniste vr (%s ei ole .swp-tiedosto?)"
+msgstr "E310: Lohon 1 tunniste väärä (%s ei ole .swp-tiedosto?)"
-#: ../memline.c:1133
msgid "???BLOCK MISSING"
msgstr "???LOHKO PUUTTUU"
-#: ../memline.c:1147
msgid "??? from here until ???END lines may be messed up"
-msgstr "??? tst kohtaan ???LOPPU rivej sekaisin"
+msgstr "??? tästä kohtaan ???LOPPU rivejä sekaisin"
-#: ../memline.c:1164
msgid "??? from here until ???END lines may have been inserted/deleted"
-msgstr "??? tst kohtaan ???LOPPU rivej saattaa olla listty tai poistettu"
+msgstr "??? tästä kohtaan ???LOPPU rivejä saattaa olla lisätty tai poistettu"
-#: ../memline.c:1181
msgid "???END"
msgstr "???LOPPU"
-#: ../memline.c:1238
msgid "E311: Recovery Interrupted"
msgstr "E311: Palautus keskeytetty"
-#: ../memline.c:1243
msgid ""
"E312: Errors detected while recovering; look for lines starting with ???"
-msgstr "E312: Palautuksessa oli virheit, etsi rivej, jotka alkavat ???"
+msgstr "E312: Palautuksessa oli virheitä, etsi rivejä, jotka alkavat ???"
-#: ../memline.c:1245
msgid "See \":help E312\" for more information."
-msgstr ":help E312 kertoo listietoja"
+msgstr ":help E312 kertoo lisätietoja"
-#: ../memline.c:1249
msgid "Recovery completed. You should check if everything is OK."
-msgstr "Palautus onnistui. Tarkista, ett kaikki on kunnossa."
+msgstr "Palautus onnistui. Tarkista, että kaikki on kunnossa."
-#: ../memline.c:1251
msgid ""
"\n"
"(You might want to write out this file under another name\n"
msgstr ""
"\n"
-"(Saattaa kannattaa kirjoittaa tm tiedosto toisella nimell\n"
+"(Saattaa kannattaa kirjoittaa tämä tiedosto toisella nimellä\n"
-#: ../memline.c:1252
msgid "and run diff with the original file to check for changes)"
-msgstr "ja katso diffill muutokset alkuperiseen tiedostoon)"
+msgstr "ja katso diffillä muutokset alkuperäiseen tiedostoon)"
-#: ../memline.c:1254
msgid "Recovery completed. Buffer contents equals file contents."
-msgstr "Palautus onnistui. Puskurin ja tiedoston sisllt tsmvt."
+msgstr "Palautus onnistui. Puskurin ja tiedoston sisällöt täsmäävät."
-#: ../memline.c:1255
msgid ""
"\n"
"You may want to delete the .swp file now.\n"
@@ -3875,51 +3586,42 @@ msgstr ""
"\n"
#. use msg() to start the scrolling properly
-#: ../memline.c:1327
msgid "Swap files found:"
-msgstr "Swap-tiedostoja lytyi:"
+msgstr "Swap-tiedostoja löytyi:"
-#: ../memline.c:1446
msgid " In current directory:\n"
-msgstr " Tss hakemistossa:\n"
+msgstr " Tässä hakemistossa:\n"
-#: ../memline.c:1448
msgid " Using specified name:\n"
-msgstr " Mritellyll nimell:\n"
+msgstr " Määritellyllä nimellä:\n"
-#: ../memline.c:1450
msgid " In directory "
msgstr " Hakemistossa "
-#: ../memline.c:1465
msgid " -- none --\n"
-msgstr " -- ei mitn --\n"
+msgstr " -- ei mitään --\n"
-#: ../memline.c:1527
msgid " owned by: "
msgstr " omistaja: "
-#: ../memline.c:1529
msgid " dated: "
msgstr " ajalta: "
-#: ../memline.c:1532 ../memline.c:3231
msgid " dated: "
msgstr " ajalta:"
-#: ../memline.c:1548
msgid " [from Vim version 3.0]"
msgstr " [Vimin 3.0-versiosta]"
-#: ../memline.c:1550
msgid " [does not look like a Vim swap file]"
-msgstr " [ei nyt Vimin swap-tiedostolta]"
+msgstr " [ei näytä Vimin swap-tiedostolta]"
+
+#~ msgid " [garbled strings (not nul terminated)]"
+#~ msgstr ""
-#: ../memline.c:1552
msgid " file name: "
msgstr " tiedostonimi: "
-#: ../memline.c:1558
msgid ""
"\n"
" modified: "
@@ -3927,27 +3629,22 @@ msgstr ""
"\n"
" muokattu: "
-#: ../memline.c:1559
msgid "YES"
-msgstr "KYLL"
+msgstr "KYLLÄ"
-#: ../memline.c:1559
msgid "no"
msgstr "ei"
-#: ../memline.c:1562
msgid ""
"\n"
" user name: "
msgstr ""
"\n"
-" kyttjnimi: "
+" käyttäjänimi: "
-#: ../memline.c:1568
msgid " host name: "
msgstr " laitenimi: "
-#: ../memline.c:1570
msgid ""
"\n"
" host name: "
@@ -3955,7 +3652,6 @@ msgstr ""
"\n"
" laitenimi: "
-#: ../memline.c:1575
msgid ""
"\n"
" process ID: "
@@ -3963,190 +3659,143 @@ msgstr ""
"\n"
" prosessin tunniste: "
-#: ../memline.c:1579
msgid " (still running)"
-msgstr " (kynniss)"
+msgstr " (käynnissä)"
-#: ../memline.c:1586
msgid ""
"\n"
" [not usable on this computer]"
msgstr ""
"\n"
-" [ei toimi tll koneella]"
+" [ei toimi tällä koneella]"
-#: ../memline.c:1590
msgid " [cannot be read]"
msgstr " [ei voi lukea]"
-#: ../memline.c:1593
msgid " [cannot be opened]"
msgstr " [ei voi avata]"
-#: ../memline.c:1698
msgid "E313: Cannot preserve, there is no swap file"
-msgstr "E313: Ei voi silytt, swap-tiedostoa ei ole"
+msgstr "E313: Ei voi säilyttää, swap-tiedostoa ei ole"
-#: ../memline.c:1747
msgid "File preserved"
-msgstr "Tiedosto silytetty"
+msgstr "Tiedosto säilytetty"
-#: ../memline.c:1749
msgid "E314: Preserve failed"
-msgstr "E314: Silyttminen eponnistui"
+msgstr "E314: Säilyttäminen epäonnistui"
-#: ../memline.c:1819
-#, c-format
-msgid "E315: ml_get: invalid lnum: %<PRId64>"
-msgstr "E315: ml_get: virheellinen lnum: %<PRId64>"
+#, fuzzy, c-format
+#~ msgid "E315: ml_get: invalid lnum: %<PRId64>"
+#~ msgstr "E315: ml_get: virheellinen lnum: %ld"
-#: ../memline.c:1851
-#, c-format
-msgid "E316: ml_get: cannot find line %<PRId64>"
-msgstr "E316: ml_get: rivi %<PRId64> ei lydy"
+#, fuzzy, c-format
+#~ msgid "E316: ml_get: cannot find line %<PRId64>"
+#~ msgstr "E316: ml_get: riviä %ld ei löydy"
-#: ../memline.c:2236
msgid "E317: pointer block id wrong 3"
-msgstr "E317: osoitinlohkon tunnus vr 3"
+msgstr "E317: osoitinlohkon tunnus väärä 3"
-#: ../memline.c:2311
msgid "stack_idx should be 0"
-msgstr "stack_idx pit olla 0"
+msgstr "stack_idx pitää olla 0"
-#: ../memline.c:2369
msgid "E318: Updated too many blocks?"
-msgstr "E318: Pivitetty liikaa lohkoja"
+msgstr "E318: Päivitetty liikaa lohkoja"
-#: ../memline.c:2511
msgid "E317: pointer block id wrong 4"
-msgstr "E317: osoitinlohkon tunnus vr 4"
+msgstr "E317: osoitinlohkon tunnus väärä 4"
-#: ../memline.c:2536
msgid "deleted block 1?"
msgstr "poistettu lohko 1?"
-#: ../memline.c:2707
-#, c-format
-msgid "E320: Cannot find line %<PRId64>"
-msgstr "E320: Rivi %<PRId64> ei lydy"
+#, fuzzy, c-format
+#~ msgid "E320: Cannot find line %<PRId64>"
+#~ msgstr "E320: Riviä %ld ei löydy"
-#: ../memline.c:2916
msgid "E317: pointer block id wrong"
-msgstr "E317: osoitinlohkon tunnus vr"
+msgstr "E317: osoitinlohkon tunnus väärä"
-#: ../memline.c:2930
msgid "pe_line_count is zero"
msgstr "pe_line_count on nolla"
-#: ../memline.c:2955
-#, c-format
-msgid "E322: line number out of range: %<PRId64> past the end"
-msgstr "E322: rivinumero arvoalueen ulkopuoleta: %<PRId64> on loppua suurempi"
+#, fuzzy, c-format
+#~ msgid "E322: line number out of range: %<PRId64> past the end"
+#~ msgstr "E322: rivinumero arvoalueen ulkopuoleta: %ld on loppua suurempi"
-#: ../memline.c:2959
-#, c-format
-msgid "E323: line count wrong in block %<PRId64>"
-msgstr "E323: rivimr vrin lohkossa %<PRId64>"
+#, fuzzy, c-format
+#~ msgid "E323: line count wrong in block %<PRId64>"
+#~ msgstr "E323: rivimäärä väärin lohkossa %ld"
-#: ../memline.c:2999
msgid "Stack size increases"
msgstr "Pinon koko kasvaa"
-#: ../memline.c:3038
msgid "E317: pointer block id wrong 2"
-msgstr "E317: osoitinlohon tunnus vr 2"
+msgstr "E317: osoitinlohon tunnus väärä 2"
-#: ../memline.c:3070
#, c-format
msgid "E773: Symlink loop for \"%s\""
msgstr "E773: Symlinkkisilmukka kohteelle %s"
-#: ../memline.c:3221
msgid "E325: ATTENTION"
msgstr "E325: HUOMAA"
-#: ../memline.c:3222
msgid ""
"\n"
"Found a swap file by the name \""
msgstr ""
"\n"
-"Swap-tiedosto lytyi: \""
+"Swap-tiedosto löytyi: \""
-#: ../memline.c:3226
msgid "While opening file \""
msgstr "Avattaessa tiedostoa "
-#: ../memline.c:3239
msgid " NEWER than swap file!\n"
msgstr " joka on UUDEMPI kuin swap-tiedosto!\n"
-#: ../memline.c:3244
-#, fuzzy
+#. Some of these messages are long to allow translation to
+#. * other languages.
msgid ""
"\n"
"(1) Another program may be editing the same file. If this is the case,\n"
" be careful not to end up with two different instances of the same\n"
-" file when making changes."
+" file when making changes. Quit, or continue with caution.\n"
msgstr ""
"\n"
-"(1) Toinen ohjelma saattaa kytt samaa tiedostoa.\n"
-" Jos nin on, varo, ettet muokkaa saman tiedoston\n"
-" kahta instanssia yht aikaa.\n"
-
-#: ../memline.c:3245
-#, fuzzy
-msgid " Quit, or continue with caution.\n"
-msgstr " Lopeta, tai jatka.\n"
+"(1) Toinen ohjelma saattaa käyttää samaa tiedostoa.\n"
+" Jos näin on, varo, ettet muokkaa saman tiedoston\n"
+" kahta instanssia yhtä aikaa. Lopeta tai jatka varoen.\n"
-#: ../memline.c:3246
-#, fuzzy
msgid "(2) An edit session for this file crashed.\n"
-msgstr ""
-"\n"
-"(2) Ohjelma on kaatunut muokatessa tiedostoa.\n"
+msgstr "(2) Tiedostonmuokkausistunto on kaatunut.\n"
-#: ../memline.c:3247
msgid " If this is the case, use \":recover\" or \"vim -r "
-msgstr " Jos nin on, kyt komentoa :recover tai vim -r "
+msgstr " Jos näin on, käytä komentoa :recover tai vim -r "
-#: ../memline.c:3249
msgid ""
"\"\n"
" to recover the changes (see \":help recovery\").\n"
msgstr ""
"\"\n"
-" palauttaaksesi muutokset (listietoja: \":help recovery\").\n"
+" palauttaaksesi muutokset (lisätietoja: \":help recovery\").\n"
-#: ../memline.c:3250
msgid " If you did this already, delete the swap file \""
-msgstr " Jos teit jo nin, poista swap-tiedosto "
+msgstr " Jos teit jo näin, poista swap-tiedosto "
-#: ../memline.c:3252
msgid ""
"\"\n"
" to avoid this message.\n"
msgstr ""
"\"\n"
-" vlttksesi tmn viestin.\n"
+" välttääksesi tämän viestin.\n"
-#: ../memline.c:3450 ../memline.c:3452
msgid "Swap file \""
msgstr "Swap-tiedosto "
-#: ../memline.c:3451 ../memline.c:3455
msgid "\" already exists!"
msgstr " on jo olemassa"
-#: ../memline.c:3457
msgid "VIM - ATTENTION"
msgstr "VIM - HUOMAUTUS"
-#: ../memline.c:3459
-msgid "Swap file already exists!"
-msgstr "Swap-tiedosto on jo olemassa"
-
-#: ../memline.c:3464
msgid ""
"&Open Read-Only\n"
"&Edit anyway\n"
@@ -4160,7 +3809,6 @@ msgstr ""
"&Lopeta\n"
"P&eru"
-#: ../memline.c:3467
msgid ""
"&Open Read-Only\n"
"&Edit anyway\n"
@@ -4184,48 +3832,48 @@ msgstr ""
#.
#. ".s?a"
#. ".saa": tried enough, give up
-#: ../memline.c:3528
msgid "E326: Too many swap files found"
msgstr "E326: Liian monta swap-tiedostoa"
-#: ../memory.c:227
-#, c-format
-msgid "E342: Out of memory! (allocating %<PRIu64> bytes)"
-msgstr "E342: Muisti loppui! (varattaessa %<PRIu64> tavua)"
+#, fuzzy, c-format
+msgid ""
+"E303: Unable to create directory \"%s\" for swap file, recovery impossible: "
+"%s"
+msgstr "E303: Swap-tiedostoa %s ei voi avata, palautus ei onnistu"
+
+#, fuzzy
+#~ msgid "Vim: Data too large to fit into virtual memory space\n"
+#~ msgstr "arvo on liian suuri mahtumaan C:n int-tyyppiin"
+
+#, fuzzy, c-format
+#~ msgid "E342: Out of memory! (allocating %<PRIu64> bytes)"
+#~ msgstr "E342: Muisti loppui! (varattaessa %lu tavua)"
-#: ../menu.c:62
msgid "E327: Part of menu-item path is not sub-menu"
msgstr "E327: Valikkokohtapolun osa ei ole alivalikko"
-#: ../menu.c:63
msgid "E328: Menu only exists in another mode"
msgstr "E328: Valikko on olemassa vain toisessa tilassa"
-#: ../menu.c:64
#, c-format
msgid "E329: No menu \"%s\""
msgstr "E329: Ei valikkoa %s"
#. Only a mnemonic or accelerator is not valid.
-#: ../menu.c:329
msgid "E792: Empty menu name"
-msgstr "E792: tyhj valikkonimi"
+msgstr "E792: tyhjä valikkonimi"
-#: ../menu.c:340
msgid "E330: Menu path must not lead to a sub-menu"
msgstr "E330: Valikkopolku ei saa johtaa alivalikkoon"
-#: ../menu.c:365
msgid "E331: Must not add menu items directly to menu bar"
-msgstr "E331: Valikkokohtia ei saa list suoraan valikkopalkkiin"
+msgstr "E331: Valikkokohtia ei saa lisätä suoraan valikkopalkkiin"
-#: ../menu.c:370
msgid "E332: Separator cannot be part of a menu path"
msgstr "E332: Erotin ei voi olla valikkopolun osa"
#. Now we have found the matching menu, and we list the mappings
#. Highlight title
-#: ../menu.c:762
msgid ""
"\n"
"--- Menus ---"
@@ -4233,87 +3881,64 @@ msgstr ""
"\n"
"--- Valikot ---"
-#: ../menu.c:1313
msgid "E333: Menu path must lead to a menu item"
msgstr "E333: Valikkopolun on johdettava valikkokohtaan"
-#: ../menu.c:1330
#, c-format
msgid "E334: Menu not found: %s"
-msgstr "E334: Valikkoa ei lydy: %s"
+msgstr "E334: Valikkoa ei löydy: %s"
-#: ../menu.c:1396
#, c-format
msgid "E335: Menu not defined for %s mode"
-msgstr "E335: Valikkoa ei ole mritelty %s-tilassa"
-
-#: ../menu.c:1426
-msgid "E336: Menu path must lead to a sub-menu"
-msgstr "E336: Valikkopolun pit johtaa alivalikkoon"
+msgstr "E335: Valikkoa ei ole määritelty %s-tilassa"
-#: ../menu.c:1447
-msgid "E337: Menu not found - check menu names"
-msgstr "E337: Valikkoa ei lytynyt - tarkista valikkojen nimet"
-
-#: ../message.c:423
#, c-format
msgid "Error detected while processing %s:"
msgstr "Virhe suoritettaessa komentoja %s:"
-#: ../message.c:445
#, c-format
msgid "line %4ld:"
msgstr "rivi %4ld:"
-#: ../message.c:617
#, c-format
msgid "E354: Invalid register name: '%s'"
msgstr "E354: Virheellinen rekisterin nimi: %s"
-#: ../message.c:986
msgid "Interrupt: "
msgstr "Keskeytys: "
-#: ../message.c:988
msgid "Press ENTER or type command to continue"
-msgstr "Paina enteri tai kirjoita komento aloittaaksesi "
+msgstr "Paina enteriä tai kirjoita komento aloittaaksesi "
-#: ../message.c:1843
-#, c-format
-msgid "%s line %<PRId64>"
-msgstr "%s rivi %<PRId64>"
+#, fuzzy, c-format
+#~ msgid "%s line %<PRId64>"
+#~ msgstr "%s rivi %ld"
-#: ../message.c:2392
msgid "-- More --"
-msgstr "-- Lis --"
+msgstr "-- Lisää --"
-#: ../message.c:2398
msgid " SPACE/d/j: screen/page/line down, b/u/k: up, q: quit "
-msgstr " SPACE/d/j: ruutu/sivu/rivi alas, b/u/k: yls, q: lopeta "
+msgstr " SPACE/d/j: ruutu/sivu/rivi alas, b/u/k: ylös, q: lopeta "
-#: ../message.c:3021 ../message.c:3031
msgid "Question"
msgstr "Kysymys"
-#: ../message.c:3023
msgid ""
"&Yes\n"
"&No"
msgstr ""
-"&Kyll\n"
+"&Kyllä\n"
"&Ei"
-#: ../message.c:3033
msgid ""
"&Yes\n"
"&No\n"
"&Cancel"
msgstr ""
-"&Kyll\n"
+"&Kyllä\n"
"&Ei\n"
"&Peru"
-#: ../message.c:3045
msgid ""
"&Yes\n"
"&No\n"
@@ -4321,180 +3946,165 @@ msgid ""
"&Discard All\n"
"&Cancel"
msgstr ""
-"&Kyll\n"
+"&Kyllä\n"
"&Ei\n"
"&Tallenna kaikki\n"
"T&uhoa kaikki\n"
"&Peru"
-#: ../message.c:3058
-msgid "E766: Insufficient arguments for printf()"
-msgstr "E766: printf():lle ei annettu tarpeeksi argumentteja"
-
-#: ../message.c:3119
-msgid "E807: Expected Float argument for printf()"
-msgstr "E807: Odotettiin Float-argumenttia printf():lle"
-
-#: ../message.c:3873
-msgid "E767: Too many arguments to printf()"
-msgstr "E767: printf():lle annettiin liikaa argumentteja"
-
-#: ../misc1.c:2256
msgid "W10: Warning: Changing a readonly file"
msgstr "W10: Varoitus: Muutetaan kirjoitussuojattua tiedostoa"
-#: ../misc1.c:2537
msgid "Type number and <Enter> or click with mouse (empty cancels): "
-msgstr "Kirjoita numero ja <Enter> tai valitse hiirell (tyhj peruu): "
+msgstr "Kirjoita numero ja <Enter> tai valitse hiirellä (tyhjä peruu): "
-#: ../misc1.c:2539
msgid "Type number and <Enter> (empty cancels): "
-msgstr "Valitse numero ja <Enter> (tyhj peruu): "
+msgstr "Valitse numero ja <Enter> (tyhjä peruu): "
-#: ../misc1.c:2585
msgid "1 more line"
-msgstr "1 rivi lis"
+msgstr "1 rivi lisää"
-#: ../misc1.c:2588
msgid "1 line less"
-msgstr "1 rivi vhemmn"
+msgstr "1 rivi vähemmän"
-#: ../misc1.c:2593
-#, c-format
-msgid "%<PRId64> more lines"
-msgstr "%<PRId64> rivi lis"
+#, fuzzy, c-format
+#~ msgid "%<PRId64> more lines"
+#~ msgstr "%ld riviä lisää"
-#: ../misc1.c:2596
-#, c-format
-msgid "%<PRId64> fewer lines"
-msgstr "%<PRId64> rivi vhemmn"
+#, fuzzy, c-format
+#~ msgid "%<PRId64> fewer lines"
+#~ msgstr "%ld riviä vähemmän"
-#: ../misc1.c:2599
msgid " (Interrupted)"
msgstr " (Keskeytetty)"
-#: ../misc1.c:2635
msgid "Beep!"
msgstr "Piip!"
-#: ../misc2.c:738
#, c-format
msgid "Calling shell to execute: \"%s\""
msgstr "Kutsutaan kuorta suorittamaan: %s"
-#: ../normal.c:183
+#, c-format
+#~ msgid "Invalid channel: %<PRIu64>"
+#~ msgstr ""
+
+#~ msgid "Message is not an array"
+#~ msgstr ""
+
+#, fuzzy
+#~ msgid "Message is empty"
+#~ msgstr "Viesti"
+
+#~ msgid "Message type must be an integer"
+#~ msgstr ""
+
+#, fuzzy
+#~ msgid "Unknown message type"
+#~ msgstr "E574: Tuntematon rekisterityyppi %d"
+
+#~ msgid "Request array size must be 4 (request) or 3 (notification)"
+#~ msgstr ""
+
+#~ msgid "ID must be a positive integer"
+#~ msgstr ""
+
+#~ msgid "Method must be a string"
+#~ msgstr ""
+
+#, fuzzy
+#~ msgid "Parameters must be an array"
+#~ msgstr "merkin nimen pitää olla yksi merkki"
+
+#.
+#. * nv_*(): functions called to handle Normal and Visual mode commands.
+#. * n_*(): functions called to handle Normal mode commands.
+#. * v_*(): functions called to handle Visual mode commands.
+#.
msgid "E349: No identifier under cursor"
msgstr "E349: Ei tunnistetta osoittimen alla"
-#: ../normal.c:1866
msgid "E774: 'operatorfunc' is empty"
-msgstr "E774: operatorfunc on tyhj"
+msgstr "E774: operatorfunc on tyhjä"
-#: ../normal.c:2637
msgid "Warning: terminal cannot highlight"
msgstr "Varoitus: terminaalista puuttuu korostus"
-#: ../normal.c:2807
msgid "E348: No string under cursor"
msgstr "E348: Ei merkkijonoa kursorin alla"
-#: ../normal.c:3937
msgid "E352: Cannot erase folds with current 'foldmethod'"
-msgstr "E352: taitoksia ei voi poistaa tll foldmethodilla"
+msgstr "E352: taitoksia ei voi poistaa tällä foldmethodilla"
-#: ../normal.c:5897
msgid "E664: changelist is empty"
-msgstr "E664: muutoslista on tyhj"
+msgstr "E664: muutoslista on tyhjä"
-#: ../normal.c:5899
msgid "E662: At start of changelist"
msgstr "E662: Muutoslistan alussa"
-#: ../normal.c:5901
msgid "E663: At end of changelist"
msgstr "E663: Muutoslistan lopussa"
-#: ../normal.c:7053
-msgid "Type :quit<Enter> to exit Nvim"
-msgstr "Komento :quit<Enter> lopettaa Vimin"
+#, fuzzy
+#~ msgid "Type :quit<Enter> to exit Nvim"
+#~ msgstr "Komento :quit<Enter> lopettaa Vimin"
-#: ../ops.c:248
#, c-format
msgid "1 line %sed 1 time"
-msgstr "1 rivi %s kerran"
+msgstr "1 riviä %s kerran"
-#: ../ops.c:250
#, c-format
msgid "1 line %sed %d times"
-msgstr "1 rivi %s %d kertaa"
+msgstr "1 riviä %s %d kertaa"
-#: ../ops.c:253
-#, c-format
-msgid "%<PRId64> lines %sed 1 time"
-msgstr "%<PRId64> rivi %s kerran"
+#, fuzzy, c-format
+#~ msgid "%<PRId64> lines %sed 1 time"
+#~ msgstr "%ld riviä %s kerran"
-#: ../ops.c:256
-#, c-format
-msgid "%<PRId64> lines %sed %d times"
-msgstr "%<PRId64> rivi %s %d kertaa"
+#, fuzzy, c-format
+#~ msgid "%<PRId64> lines %sed %d times"
+#~ msgstr "%ld riviä %s %d kertaa"
-#: ../ops.c:592
-#, c-format
-msgid "%<PRId64> lines to indent... "
-msgstr "%<PRId64> rivi sisennettvn..."
+#, fuzzy, c-format
+#~ msgid "%<PRId64> lines to indent... "
+#~ msgstr "%ld riviä sisennettävänä..."
-#: ../ops.c:634
msgid "1 line indented "
msgstr "1 rivi sisennetty "
-#: ../ops.c:636
-#, c-format
-msgid "%<PRId64> lines indented "
-msgstr "%<PRId64> rivi sisennetty "
+#, fuzzy, c-format
+#~ msgid "%<PRId64> lines indented "
+#~ msgstr "%ld riviä sisennetty "
-#: ../ops.c:938
msgid "E748: No previously used register"
-msgstr "E748: Ei aiemmin kytettyj rekisterej"
+msgstr "E748: Ei aiemmin käytettyjä rekisterejä"
-#. must display the prompt
-#: ../ops.c:1433
-msgid "cannot yank; delete anyway"
-msgstr "Ei voi kopioida; poista joka tapauksessa"
-
-#: ../ops.c:1929
msgid "1 line changed"
msgstr "1 rivi muuttui"
-#: ../ops.c:1931
-#, c-format
-msgid "%<PRId64> lines changed"
-msgstr "%<PRId64> rivi muuttui"
+#, fuzzy, c-format
+#~ msgid "%<PRId64> lines changed"
+#~ msgstr "%ld riviä muuttui"
-#: ../ops.c:2521
msgid "block of 1 line yanked"
msgstr "1 rivin lohko kopioitu"
-#: ../ops.c:2523
msgid "1 line yanked"
msgstr "1 rivi kopioitu"
-#: ../ops.c:2525
-#, c-format
-msgid "block of %<PRId64> lines yanked"
-msgstr "lohko %<PRId64> rivilt kopioitu"
+#, fuzzy, c-format
+#~ msgid "block of %<PRId64> lines yanked"
+#~ msgstr "lohko %ld riviltä kopioitu"
-#: ../ops.c:2528
-#, c-format
-msgid "%<PRId64> lines yanked"
-msgstr "%<PRId64> rivi kopioitu"
+#, fuzzy, c-format
+#~ msgid "%<PRId64> lines yanked"
+#~ msgstr "%ld riviä kopioitu"
-#: ../ops.c:2710
#, c-format
msgid "E353: Nothing in register %s"
-msgstr "E353: Rekisteriss %s ei ole mitn"
+msgstr "E353: Rekisterissä %s ei ole mitään"
#. Highlight title
-#: ../ops.c:3185
msgid ""
"\n"
"--- Registers ---"
@@ -4502,207 +4112,142 @@ msgstr ""
"\n"
"--- Rekisterit ---"
-#: ../ops.c:4455
-msgid "Illegal register name"
-msgstr "Virheellinen rekisterin nimi"
-
-#: ../ops.c:4533
msgid ""
-"\n"
-"# Registers:\n"
+"E883: search pattern and expression register may not contain two or more "
+"lines"
msgstr ""
-"\n"
-"# Rekisterit:\n"
+"E883: hakulauseke- ja -ilmausrekisteri ei voi sisältää kahta tai useampaa "
+"riviä"
-#: ../ops.c:4575
-#, c-format
-msgid "E574: Unknown register type %d"
-msgstr "E574: Tuntematon rekisterityyppi %d"
-
-#: ../ops.c:5089
-#, c-format
-msgid "%<PRId64> Cols; "
-msgstr "%<PRId64> saraketta, "
+#, fuzzy, c-format
+#~ msgid "%<PRId64> Cols; "
+#~ msgstr "%ld saraketta, "
-#: ../ops.c:5097
-#, c-format
+#, fuzzy, c-format
msgid ""
"Selected %s%<PRId64> of %<PRId64> Lines; %<PRId64> of %<PRId64> Words; "
"%<PRId64> of %<PRId64> Bytes"
-msgstr ""
-"Valittu %s%<PRId64>/%<PRId64> rivi, %<PRId64>/%<PRId64> sanaa, %<PRId64>/"
-"%<PRId64> tavua"
+msgstr "Valittu %s%ld/%ld riviä, %lld/%lld sanaa, %lld/%lld tavua"
-#: ../ops.c:5105
-#, c-format
+#, fuzzy, c-format
msgid ""
"Selected %s%<PRId64> of %<PRId64> Lines; %<PRId64> of %<PRId64> Words; "
"%<PRId64> of %<PRId64> Chars; %<PRId64> of %<PRId64> Bytes"
msgstr ""
-"Valittu %s%<PRId64>/%<PRId64> rivi, %<PRId64>/%<PRId64> sanaa, %<PRId64>/"
-"%<PRId64> merkki, %<PRId64>/%<PRId64> tavua"
+"Valittu %s%ld/%ld riviä, %lld/%lld sanaa, %lld/%lld merkkiä, %lld/%lld tavua"
-#: ../ops.c:5123
-#, c-format
+#, fuzzy, c-format
msgid ""
"Col %s of %s; Line %<PRId64> of %<PRId64>; Word %<PRId64> of %<PRId64>; Byte "
"%<PRId64> of %<PRId64>"
-msgstr ""
-"Sarake %s/%s, Rivi %<PRId64>/%<PRId64>, sana %<PRId64>/%<PRId64>, tavu "
-"%<PRId64>/%<PRId64>"
+msgstr "Sarake %s/%s, Rivi %ld/%ld, sana %lld/%lld, tavu %lld/%lld"
-#: ../ops.c:5133
-#, c-format
+#, fuzzy, c-format
msgid ""
"Col %s of %s; Line %<PRId64> of %<PRId64>; Word %<PRId64> of %<PRId64>; Char "
"%<PRId64> of %<PRId64>; Byte %<PRId64> of %<PRId64>"
msgstr ""
-"Sarake %s/%s, rivi %<PRId64>/%<PRId64>, sana %<PRId64>/%<PRId64>, merkki "
-"%<PRId64>/%<PRId64>, tavu %<PRId64>/%<PRId64>"
+"Sarake %s/%s, rivi %ld/%ld, sana %lld/%lld, merkki %lld/%lld, tavu %lld/%lld"
# Unicode Byte Order Mark
-#: ../ops.c:5146
-#, c-format
-msgid "(+%<PRId64> for BOM)"
-msgstr "(+%<PRId64> BOMista)"
-
-#: ../option.c:1238
-msgid "%<%f%h%m%=Page %N"
-msgstr "%<%f%h%m%=Sivu %N"
-
-#: ../option.c:1574
-msgid "Thanks for flying Vim"
-msgstr "Kiitos ett ajoit Vimi"
+#, fuzzy, c-format
+#~ msgid "(+%<PRId64> for BOM)"
+#~ msgstr "(+%ld BOMista)"
#. found a mismatch: skip
-#: ../option.c:2698
msgid "E518: Unknown option"
msgstr "E518: Tuntematon asetus"
-#: ../option.c:2709
-msgid "E519: Option not supported"
-msgstr "E519: Asetusta ei tueta"
-
-#: ../option.c:2740
msgid "E520: Not allowed in a modeline"
-msgstr "E520: Ei sallitu modeline-rivill"
+msgstr "E520: Ei sallitu modeline-rivillä"
-#: ../option.c:2815
msgid "E846: Key code not set"
-msgstr ""
+msgstr "E846: Avainkoodi puuttuu"
-#: ../option.c:2924
msgid "E521: Number required after ="
-msgstr "E521: =:n jlkeen tarvitaan luku"
-
-#: ../option.c:3226 ../option.c:3864
-msgid "E522: Not found in termcap"
-msgstr "E522: Puuttuu termcapista"
+msgstr "E521: =:n jälkeen tarvitaan luku"
-#: ../option.c:3335
#, c-format
msgid "E539: Illegal character <%s>"
msgstr "E539: Virheellinen merkki <%s>"
-#: ../option.c:3862
-msgid "E529: Cannot set 'term' to empty string"
-msgstr "E529: Termi ei voi asettaa tyhjksi merkkijonoksi"
+#, c-format
+msgid "For option %s"
+msgstr "Asetukselle %s"
-#: ../option.c:3885
msgid "E589: 'backupext' and 'patchmode' are equal"
msgstr "E589: backupext ja patchmod ovat samat"
-#: ../option.c:3964
msgid "E834: Conflicts with value of 'listchars'"
msgstr "E834: listcharsin arvoissa on ristiriitoja"
-#: ../option.c:3966
msgid "E835: Conflicts with value of 'fillchars'"
msgstr "E835: fillcharsin arvossa on ristiriitoja"
-#: ../option.c:4163
msgid "E524: Missing colon"
msgstr "E524: Kaksoispiste puuttuu"
-#: ../option.c:4165
msgid "E525: Zero length string"
msgstr "E525: Nollan pituinen merkkijono"
-#: ../option.c:4220
#, c-format
msgid "E526: Missing number after <%s>"
-msgstr "E526: Lukuarvo puuttuu merkkijonon <%s> jlkeen"
+msgstr "E526: Lukuarvo puuttuu merkkijonon <%s> jälkeen"
-#: ../option.c:4232
msgid "E527: Missing comma"
msgstr "E527: Pilkku puuttuu"
-#: ../option.c:4239
msgid "E528: Must specify a ' value"
-msgstr "E528: '-arvo pit antaa"
+msgstr "E528: '-arvo pitää antaa"
-#: ../option.c:4271
msgid "E595: contains unprintable or wide character"
-msgstr "E595: Sislt tulostumattomia tai leveit merkkej"
+msgstr "E595: Sisältää tulostumattomia tai leveitä merkkejä"
-#: ../option.c:4469
#, c-format
msgid "E535: Illegal character after <%c>"
-msgstr "E535: Virheellinen merkki merkin <%c> jlkeen"
+msgstr "E535: Virheellinen merkki merkin <%c> jälkeen"
-#: ../option.c:4534
msgid "E536: comma required"
msgstr "E536: pilkku puuttuu"
-#: ../option.c:4543
#, c-format
msgid "E537: 'commentstring' must be empty or contain %s"
-msgstr "E537: commentstringin pit olla tyhj tai sislt %s"
+msgstr "E537: commentstringin pitää olla tyhjä tai sisältää %s"
-#: ../option.c:4928
msgid "E540: Unclosed expression sequence"
msgstr "E540: Sulkematon lausekesarja"
-#: ../option.c:4932
msgid "E541: too many items"
msgstr "E541: liikaa kohteita"
-#: ../option.c:4934
msgid "E542: unbalanced groups"
-msgstr "E542: eptasapainoisia ryhmi"
+msgstr "E542: epätasapainoisia ryhmiä"
-#: ../option.c:5148
msgid "E590: A preview window already exists"
msgstr "E590: Esikatseluikkuna on jo olemassa"
-#: ../option.c:5311
msgid "W17: Arabic requires UTF-8, do ':set encoding=utf-8'"
-msgstr "W17: Arabialle pit olla UTF-8:aa, aseta :set encoding=utf-8"
+msgstr "W17: Arabialle pitää olla UTF-8:aa, aseta :set encoding=utf-8"
-#: ../option.c:5623
#, c-format
msgid "E593: Need at least %d lines"
-msgstr "E593: Tarvitaan ainakin %d rivi"
+msgstr "E593: Tarvitaan ainakin %d riviä"
-#: ../option.c:5631
#, c-format
msgid "E594: Need at least %d columns"
msgstr "E594: Tarvitaan ainakin %d saraketta"
-#: ../option.c:6011
#, c-format
msgid "E355: Unknown option: %s"
msgstr "E355: Tuntematon asetus: %s"
#. There's another character after zeros or the string
-#. * is empty. In both cases, we are trying to set a
-#. * num option using a string.
-#: ../option.c:6037
+#. is empty. In both cases, we are trying to set a
+#. num option using a string.
#, c-format
msgid "E521: Number required: &%s = '%s'"
msgstr "E521: tarvitaan luku: &%s = '%s'"
-#: ../option.c:6149
msgid ""
"\n"
"--- Terminal codes ---"
@@ -4710,7 +4255,6 @@ msgstr ""
"\n"
"--- Terminaalikoodit ---"
-#: ../option.c:6151
msgid ""
"\n"
"--- Global option values ---"
@@ -4718,7 +4262,6 @@ msgstr ""
"\n"
"--- Globaalit asetukset ---"
-#: ../option.c:6153
msgid ""
"\n"
"--- Local option values ---"
@@ -4726,7 +4269,6 @@ msgstr ""
"\n"
"--- Paikalliset asetukset ---"
-#: ../option.c:6155
msgid ""
"\n"
"--- Options ---"
@@ -4734,29 +4276,24 @@ msgstr ""
"\n"
"--- Asetukset ---"
-#: ../option.c:6816
msgid "E356: get_varp ERROR"
msgstr "E356: get_varp-virhe"
-#: ../option.c:7696
#, c-format
msgid "E357: 'langmap': Matching character missing for %s"
-msgstr "E357: langmap: Merkkiin %s tsmv merkki puuttuu"
+msgstr "E357: langmap: Merkkiin %s täsmäävä merkki puuttuu"
-#: ../option.c:7715
#, c-format
msgid "E358: 'langmap': Extra characters after semicolon: %s"
-msgstr "E358: langmap: ylimrisi merkkej puolipisteen jlkeen: %s"
+msgstr "E358: langmap: ylimääräisiä merkkejä puolipisteen jälkeen: %s"
-#: ../os/shell.c:194
-msgid ""
-"\n"
-"Cannot execute shell "
-msgstr ""
-"\n"
-"Kuoren suoritus ei onnistu "
+#, c-format
+msgid "dlerror = \"%s\""
+msgstr "dlerror = %s"
+
+msgid "Vim: Error reading input, exiting...\n"
+msgstr "Vim: Virhe luettaessa syötettä, poistutaan...\n"
-#: ../os/shell.c:439
msgid ""
"\n"
"shell returned "
@@ -4764,8 +4301,18 @@ msgstr ""
"\n"
"kuoren palautusarvo "
-# mik security context?
-#: ../os_unix.c:465 ../os_unix.c:471
+#~ msgid ""
+#~ "\n"
+#~ "shell failed to start: "
+#~ msgstr ""
+
+#. Can happen if system() tries to send input to a shell command that was
+#. backgrounded (:call system("cat - &", "foo")). #3529 #5241
+#, fuzzy, c-format
+#~ msgid "E5677: Error writing input to shell-command: %s"
+#~ msgstr "E677: Väliaikaistiedostoon kirjoittaminen ei onnistunut"
+
+# mikä security context?
msgid ""
"\n"
"Could not get security context for "
@@ -4773,7 +4320,6 @@ msgstr ""
"\n"
"Ei saatu turvallisuuskontekstia kohteelle "
-#: ../os_unix.c:479
msgid ""
"\n"
"Could not set security context for "
@@ -4781,947 +4327,897 @@ msgstr ""
"\n"
"Ei voitu asettaa turvallisuuskontekstia kohteelle "
-#: ../os_unix.c:1558 ../os_unix.c:1647
-#, c-format
-msgid "dlerror = \"%s\""
-msgstr "dlerror = %s"
-
-#: ../path.c:1449
#, c-format
msgid "E447: Can't find file \"%s\" in path"
-msgstr "E447: Tiedosto %s ei lydy polulta"
+msgstr "E447: Tiedosto %s ei löydy polulta"
-#: ../quickfix.c:359
#, c-format
msgid "E372: Too many %%%c in format string"
msgstr "E372: Liikaa %%%c-juttuja muotoilumerkkijonossa"
-#: ../quickfix.c:371
#, c-format
msgid "E373: Unexpected %%%c in format string"
msgstr "E373: Odottamaton %%%c muotoilumerkkijonossa"
-#: ../quickfix.c:420
msgid "E374: Missing ] in format string"
msgstr "E374: ] puuttuu muotoilemerkkijonosta"
-#: ../quickfix.c:431
#, c-format
msgid "E375: Unsupported %%%c in format string"
msgstr "E375: Tukematon %%%c muotoilumerkkijonossa"
-#: ../quickfix.c:448
#, c-format
msgid "E376: Invalid %%%c in format string prefix"
msgstr "E376: Virheellinen %%%c muotoilumerkkijonon alussa"
-#: ../quickfix.c:454
#, c-format
msgid "E377: Invalid %%%c in format string"
msgstr "E377: Virheellinen %%%c muotoilumerkkijonossa"
#. nothing found
-#: ../quickfix.c:477
msgid "E378: 'errorformat' contains no pattern"
msgstr "E378: errorformatissa ei ole kuvioita"
-#: ../quickfix.c:695
msgid "E379: Missing or empty directory name"
-msgstr "E379: Puuttuva tai tyhj hakemiston nimi"
+msgstr "E379: Puuttuva tai tyhjä hakemiston nimi"
-#: ../quickfix.c:1305
msgid "E553: No more items"
-msgstr "E553: Ei en kohteita"
+msgstr "E553: Ei enää kohteita"
+
+msgid "E924: Current window was closed"
+msgstr "E924: Nykyinen ikkuna on suljettu"
+
+msgid "E925: Current quickfix was changed"
+msgstr "E925: Nykyinen quickfix on muuttunut"
+
+msgid "E926: Current location list was changed"
+msgstr "E926: Nykyinen sijaintiluettelo on muuttunut"
-#: ../quickfix.c:1674
#, c-format
msgid "(%d of %d)%s%s: "
msgstr "(%d/%d)%s%s: "
-#: ../quickfix.c:1676
msgid " (line deleted)"
msgstr " (rivi poistettu)"
-#: ../quickfix.c:1863
+#, c-format
+msgid "%serror list %d of %d; %d errors "
+msgstr "%svirhelista %d/%d, %d virhettä"
+
msgid "E380: At bottom of quickfix stack"
msgstr "E380: quickfix-pinon pohjalla"
-#: ../quickfix.c:1869
msgid "E381: At top of quickfix stack"
msgstr "E381: quickfix-pinon huipulla"
-#: ../quickfix.c:1880
-#, c-format
-msgid "error list %d of %d; %d errors"
-msgstr "virhelista %d/%d, %d virhett"
+msgid "No entries"
+msgstr "Ei kenttiä"
-#: ../quickfix.c:2427
msgid "E382: Cannot write, 'buftype' option is set"
msgstr "E382: Ei voi kirjoittaa, buftype asetettu"
-#: ../quickfix.c:2812
msgid "E683: File name missing or invalid pattern"
msgstr "E683: Tiedostonimi puuttuu tai kuvio on viallinen"
-#: ../quickfix.c:2911
#, c-format
msgid "Cannot open file \"%s\""
msgstr "Tiedostoa %s ei voi avata"
-#: ../quickfix.c:3429
msgid "E681: Buffer is not loaded"
msgstr "E681: Puskuria ei ole ladattu"
-#: ../quickfix.c:3487
msgid "E777: String or List expected"
-msgstr "E777: Pit olla merkkijono tai lista"
+msgstr "E777: Pitää olla merkkijono tai lista"
-#: ../regexp.c:359
#, c-format
msgid "E369: invalid item in %s%%[]"
msgstr "E369: virheellinen olio kohdassa %s%%[]"
-#: ../regexp.c:374
#, c-format
msgid "E769: Missing ] after %s["
-msgstr "E769: ] puuttuu merkinnn %s[ jljest"
+msgstr "E769: ] puuttuu merkinnän %s[ jäljestä"
-#: ../regexp.c:375
#, c-format
msgid "E53: Unmatched %s%%("
msgstr "E53: Pariton %s%%("
-#: ../regexp.c:376
#, c-format
msgid "E54: Unmatched %s("
msgstr "E54: Pariton %s("
-#: ../regexp.c:377
#, c-format
msgid "E55: Unmatched %s)"
msgstr "E55: Pariton %s)"
-#: ../regexp.c:378
msgid "E66: \\z( not allowed here"
-msgstr "E66: \\z( ei ole sallittu tss"
+msgstr "E66: \\z( ei ole sallittu tässä"
-#: ../regexp.c:379
msgid "E67: \\z1 et al. not allowed here"
-msgstr "E67: \\z1 jne. ei ole sallittu tss"
+msgstr "E67: \\z1 jne. ei ole sallittu tässä"
-#: ../regexp.c:380
#, c-format
msgid "E69: Missing ] after %s%%["
-msgstr "E69: ] puuttuu merkinnn %s%%[ jljest"
+msgstr "E69: ] puuttuu merkinnän %s%%[ jäljestä"
-#: ../regexp.c:381
#, c-format
msgid "E70: Empty %s%%[]"
-msgstr "E70: Tyhj %s%%[]"
+msgstr "E70: Tyhjä %s%%[]"
-#: ../regexp.c:1209 ../regexp.c:1224
msgid "E339: Pattern too long"
-msgstr "E339: Liian pitk kuvio"
+msgstr "E339: Liian pitkä kuvio"
-#: ../regexp.c:1371
msgid "E50: Too many \\z("
-msgstr "E50: Liikaa merkkej \\z("
+msgstr "E50: Liikaa merkkejä \\z("
-#: ../regexp.c:1378
#, c-format
msgid "E51: Too many %s("
-msgstr "E51: Liikaa merkkej %s("
+msgstr "E51: Liikaa merkkejä %s("
-#: ../regexp.c:1427
msgid "E52: Unmatched \\z("
msgstr "E52: Pariton \\z("
-#: ../regexp.c:1637
#, c-format
msgid "E59: invalid character after %s@"
-msgstr "E59: virheellinen merkki kohdan %s@ jlkeen"
+msgstr "E59: virheellinen merkki kohdan %s@ jälkeen"
-#: ../regexp.c:1672
#, c-format
msgid "E60: Too many complex %s{...}s"
msgstr "E60: Liikaa monimutkaisia ilmauksia %s{...}s"
-#: ../regexp.c:1687
#, c-format
msgid "E61: Nested %s*"
-msgstr "E61: Siskkistetty %s*"
+msgstr "E61: Sisäkkäistetty %s*"
-#: ../regexp.c:1690
#, c-format
msgid "E62: Nested %s%c"
-msgstr "E62: Siskkistetty %s%c"
+msgstr "E62: Sisäkkäistetty %s%c"
-#: ../regexp.c:1800
msgid "E63: invalid use of \\_"
-msgstr "E63: vrinkytetty \\_"
+msgstr "E63: väärinkäytetty \\_"
-#: ../regexp.c:1850
#, c-format
msgid "E64: %s%c follows nothing"
-msgstr "E64: %s%c jlkeen ei minkn"
+msgstr "E64: %s%c jälkeen ei minkään"
-#: ../regexp.c:1902
msgid "E65: Illegal back reference"
-msgstr "E65: Virheellinen tsmysviittaus"
+msgstr "E65: Virheellinen täsmäysviittaus"
-#: ../regexp.c:1943
msgid "E68: Invalid character after \\z"
-msgstr "E68: Virheellinen merkki ilmauksen \\z jlkeen"
+msgstr "E68: Virheellinen merkki ilmauksen \\z jälkeen"
-#: ../regexp.c:2049 ../regexp_nfa.c:1296
#, c-format
msgid "E678: Invalid character after %s%%[dxouU]"
-msgstr "E678: Virheellinen merkki merkinnn %s%%[dxouU] jljess"
+msgstr "E678: Virheellinen merkki merkinnän %s%%[dxouU] jäljessä"
-#: ../regexp.c:2107
#, c-format
msgid "E71: Invalid character after %s%%"
-msgstr "E71: Virheellinen merkki merkinnn %s%% jljess"
+msgstr "E71: Virheellinen merkki merkinnän %s%% jäljessä"
+
+#, c-format
+msgid "E888: (NFA regexp) cannot repeat %s"
+msgstr "E888: (NFA-säänn. ilmaus) ei voi toistaa kohdetta %s"
-#: ../regexp.c:3017
#, c-format
msgid "E554: Syntax error in %s{...}"
msgstr "E554: Syntaksivirhe ilmauksessa %s{...}"
-#: ../regexp.c:3805
msgid "External submatches:\n"
-msgstr "Ulkoisia alitsmyksi:\n"
+msgstr "Ulkoisia alitäsmäyksiä:\n"
-#: ../regexp.c:7022
msgid ""
"E864: \\%#= can only be followed by 0, 1, or 2. The automatic engine will be "
"used "
msgstr ""
+"E864: \\%#=-merkkien perään voi tulla vain 0, 1 tai 2. Käytetään "
+"automaattista engineä "
-#: ../regexp_nfa.c:239
-msgid "E865: (NFA) Regexp end encountered prematurely"
-msgstr ""
-
-#: ../regexp_nfa.c:240
-#, c-format
-msgid "E866: (NFA regexp) Misplaced %c"
-msgstr ""
-
-#: ../regexp_nfa.c:242
-#, c-format
-msgid "E877: (NFA regexp) Invalid character class: %<PRId64>"
-msgstr ""
-
-#: ../regexp_nfa.c:1261
-#, c-format
-msgid "E867: (NFA) Unknown operator '\\z%c'"
-msgstr ""
-
-#: ../regexp_nfa.c:1387
-#, c-format
-msgid "E867: (NFA) Unknown operator '\\%%%c'"
-msgstr ""
-
-#: ../regexp_nfa.c:1802
-#, c-format
-msgid "E869: (NFA) Unknown operator '\\@%c'"
-msgstr ""
-
-#: ../regexp_nfa.c:1831
-msgid "E870: (NFA regexp) Error reading repetition limits"
-msgstr ""
-
-#. Can't have a multi follow a multi.
-#: ../regexp_nfa.c:1895
-msgid "E871: (NFA regexp) Can't have a multi follow a multi !"
-msgstr ""
-
-#. Too many `('
-#: ../regexp_nfa.c:2037
-msgid "E872: (NFA regexp) Too many '('"
-msgstr ""
-
-#: ../regexp_nfa.c:2042
-#, fuzzy
-msgid "E879: (NFA regexp) Too many \\z("
-msgstr "E50: Liikaa merkkej \\z("
-
-#: ../regexp_nfa.c:2066
-msgid "E873: (NFA regexp) proper termination error"
-msgstr ""
-
-#: ../regexp_nfa.c:2599
-msgid "E874: (NFA) Could not pop the stack !"
-msgstr ""
-
-#: ../regexp_nfa.c:3298
-msgid ""
-"E875: (NFA regexp) (While converting from postfix to NFA), too many states "
-"left on stack"
-msgstr ""
-
-#: ../regexp_nfa.c:3302
-msgid "E876: (NFA regexp) Not enough space to store the whole NFA "
-msgstr ""
-
-#: ../regexp_nfa.c:4571 ../regexp_nfa.c:4869
-msgid ""
-"Could not open temporary log file for writing, displaying on stderr ... "
-msgstr ""
+msgid "Switching to backtracking RE engine for pattern: "
+msgstr "Vaihdetaan käyttämään backtrackkaavaa RE-engineä ilmaukselle: "
-#: ../regexp_nfa.c:4840
-#, c-format
-msgid "(NFA) COULD NOT OPEN %s !"
-msgstr ""
-
-#: ../regexp_nfa.c:6049
-#, fuzzy
-msgid "Could not open temporary log file for writing "
-msgstr "E828: Kumoustiedoston avaus kirjoittamista varten ei onnistu: %s"
+#~ msgid " TERMINAL"
+#~ msgstr ""
# tiloja
-#: ../screen.c:7435
msgid " VREPLACE"
msgstr " VKORVAUS"
-#: ../screen.c:7437
msgid " REPLACE"
msgstr " KORVAUS"
-#: ../screen.c:7440
msgid " REVERSE"
-msgstr " KNTEIS"
+msgstr " KÄÄNTEIS"
-#: ../screen.c:7441
msgid " INSERT"
-msgstr " SYTT"
+msgstr " SYÖTTÖ"
-#: ../screen.c:7443
msgid " (insert)"
-msgstr " (sytt)"
+msgstr " (syöttö)"
-#: ../screen.c:7445
msgid " (replace)"
msgstr " (korvaus)"
-#: ../screen.c:7447
msgid " (vreplace)"
msgstr " (vkorvaus)"
-#: ../screen.c:7449
msgid " Hebrew"
msgstr " Heprea"
-#: ../screen.c:7454
msgid " Arabic"
msgstr " Arabia"
-#: ../screen.c:7456
-msgid " (lang)"
-msgstr " (kieli)"
-
-#: ../screen.c:7459
msgid " (paste)"
msgstr " (liitos)"
-#: ../screen.c:7469
msgid " VISUAL"
msgstr " VALINTA"
-#: ../screen.c:7470
msgid " VISUAL LINE"
msgstr " VALINTARIVI"
-#: ../screen.c:7471
msgid " VISUAL BLOCK"
msgstr " VALINTALOHKO"
-#: ../screen.c:7472
msgid " SELECT"
msgstr " WALINTA"
-#: ../screen.c:7473
msgid " SELECT LINE"
msgstr " WALINTARIVI"
-#: ../screen.c:7474
msgid " SELECT BLOCK"
msgstr " WALINTALOHKO"
-#: ../screen.c:7486 ../screen.c:7541
msgid "recording"
msgstr "tallennetaan"
-#: ../search.c:487
#, c-format
msgid "E383: Invalid search string: %s"
msgstr "E383: Viallinen hakujono: %s"
-#: ../search.c:832
#, c-format
msgid "E384: search hit TOP without match for: %s"
-msgstr "E384: Haku psi alkuun lytmtt jonoa: %s"
+msgstr "E384: Haku pääsi alkuun löytämättä jonoa: %s"
-#: ../search.c:835
#, c-format
msgid "E385: search hit BOTTOM without match for: %s"
-msgstr "E385: Haku psi loppuun lytmtt jonoa: %s"
+msgstr "E385: Haku pääsi loppuun löytämättä jonoa: %s"
-#: ../search.c:1200
msgid "E386: Expected '?' or '/' after ';'"
-msgstr "E386: ;:n jlkeen pit olla ? tai /"
+msgstr "E386: ;:n jälkeen pitää olla ? tai /"
-#: ../search.c:4085
msgid " (includes previously listed match)"
-msgstr " (sislt viimeksi luetellun tsmyksen)"
+msgstr " (sisältää viimeksi luetellun täsmäyksen)"
#. cursor at status line
-#: ../search.c:4104
msgid "--- Included files "
-msgstr "--- Sisllytetyt tiedostot "
+msgstr "--- Sisällytetyt tiedostot "
-#: ../search.c:4106
msgid "not found "
-msgstr "ei lytynyt "
+msgstr "ei löytynyt "
-#: ../search.c:4107
msgid "in path ---\n"
msgstr "polusta ---\n"
-#: ../search.c:4168
msgid " (Already listed)"
msgstr " (Jo lueteltu)"
-#: ../search.c:4170
msgid " NOT FOUND"
-msgstr " EI LYTYNYT"
+msgstr " EI LÖYTYNYT"
-#: ../search.c:4211
#, c-format
msgid "Scanning included file: %s"
-msgstr "Haku sislsi tiedoston: %s"
+msgstr "Haku sisälsi tiedoston: %s"
-#: ../search.c:4216
#, c-format
msgid "Searching included file %s"
-msgstr "Haku sislsi tiedoston %s"
+msgstr "Haku sisälsi tiedoston %s"
-#: ../search.c:4405
msgid "E387: Match is on current line"
-msgstr "E387: Tsmys tll rivill"
+msgstr "E387: Täsmäys tällä rivillä"
-#: ../search.c:4517
msgid "All included files were found"
-msgstr "Kaikki sisllytetyt rivit lytyivt"
+msgstr "Kaikki sisällytetyt rivit löytyivät"
-#: ../search.c:4519
msgid "No included files"
-msgstr "Ei sisllytettyj tiedostoja"
+msgstr "Ei sisällytettyjä tiedostoja"
-#: ../search.c:4527
msgid "E388: Couldn't find definition"
-msgstr "E388: Mritelm ei lydy"
+msgstr "E388: Määritelmä ei löydy"
-#: ../search.c:4529
msgid "E389: Couldn't find pattern"
-msgstr "E389: kuvio ei lydy"
+msgstr "E389: kuvio ei löydy"
+
+#~ msgid "too few bytes read"
+#~ msgstr ""
-#: ../search.c:4668
-msgid "Substitute "
-msgstr "Korvaa "
+#, fuzzy, c-format
+#~ msgid "System error while skipping in ShaDa file: %s"
+#~ msgstr "E782: virhe luettaessa .sug-tiedostoa: %s"
-#: ../search.c:4681
#, c-format
-msgid ""
-"\n"
-"# Last %sSearch Pattern:\n"
-"~"
-msgstr ""
-"\n"
-"# Edellinen %sHakulauseke:\n"
-"~"
+#~ msgid ""
+#~ "Error while reading ShaDa file: last entry specified that it occupies "
+#~ "%<PRIu64> bytes, but file ended earlier"
+#~ msgstr ""
+
+#, fuzzy, c-format
+#~ msgid "System error while closing ShaDa file: %s"
+#~ msgstr "E782: virhe luettaessa .sug-tiedostoa: %s"
+
+#, fuzzy, c-format
+#~ msgid "System error while writing ShaDa file: %s"
+#~ msgstr "E782: virhe luettaessa .sug-tiedostoa: %s"
+
+#, fuzzy, c-format
+#~ msgid "Reading ShaDa file \"%s\"%s%s%s"
+#~ msgstr "Luetaan viminfo-tiedostoa \"%s\"%s%s%s"
+
+msgid " info"
+msgstr " info"
+
+msgid " marks"
+msgstr " merkit"
+
+msgid " oldfiles"
+msgstr " vanhaatiedostoa"
+
+msgid " FAILED"
+msgstr " EPÄONNISTUI"
+
+#, c-format
+#~ msgid "System error while opening ShaDa file %s for reading: %s"
+#~ msgstr ""
+
+#~ msgid "additional elements of ShaDa "
+#~ msgstr ""
+
+#~ msgid "additional data of ShaDa "
+#~ msgstr ""
+
+#, fuzzy, c-format
+#~ msgid "Failed to write variable %s"
+#~ msgstr "ei voitu vaihtaa puskuriin %d"
+
+#, c-format
+#~ msgid ""
+#~ "Failed to parse ShaDa file due to a msgpack parser error at position "
+#~ "%<PRIu64>"
+#~ msgstr ""
+
+#, c-format
+#~ msgid ""
+#~ "Failed to parse ShaDa file: incomplete msgpack string at position %<PRIu64>"
+#~ msgstr ""
+
+#, c-format
+#~ msgid ""
+#~ "Failed to parse ShaDa file: extra bytes in msgpack string at position "
+#~ "%<PRIu64>"
+#~ msgstr ""
+
+#, c-format
+#~ msgid ""
+#~ "System error while opening ShaDa file %s for reading to merge before writing "
+#~ "it: %s"
+#~ msgstr ""
+
+#. Tried names from .tmp.a to .tmp.z, all failed. Something must be
+#. wrong then.
+#, c-format
+#~ msgid "E138: All %s.tmp.X files exist, cannot write ShaDa file!"
+#~ msgstr ""
+
+#, fuzzy, c-format
+#~ msgid "System error while opening temporary ShaDa file %s for writing: %s"
+#~ msgstr "Väliaikaislokitiedoston avaus kirjoittamista varten ei onnistu"
+
+#, c-format
+#~ msgid "Failed to create directory %s for writing ShaDa file: %s"
+#~ msgstr ""
+
+#, c-format
+#~ msgid "System error while opening ShaDa file %s for writing: %s"
+#~ msgstr ""
+
+#, fuzzy, c-format
+#~ msgid "Writing ShaDa file \"%s\""
+#~ msgstr "Kirjoitetaan viminfo-tiedostoa %s"
+
+#, fuzzy, c-format
+#~ msgid "Failed setting uid and gid for file %s: %s"
+#~ msgstr "Ladattu kumoustiedoto %s"
+
+#, fuzzy, c-format
+#~ msgid "E137: ShaDa file is not writable: %s"
+#~ msgstr "E137: Viminfo-tiedostoon ei voitu kirjoittaa: %s"
+
+#, fuzzy, c-format
+#~ msgid "Can't rename ShaDa file from %s to %s!"
+#~ msgstr "E886: Viminfo-tiedostoa ei voit uudelleennimetä nimelle %s"
+
+#, fuzzy, c-format
+#~ msgid "Did not rename %s because %s does not looks like a ShaDa file"
+#~ msgstr " [ei näytä Vimin swap-tiedostolta]"
+
+#, c-format
+#~ msgid "Did not rename %s to %s because there were errors during writing it"
+#~ msgstr ""
+
+#, c-format
+#~ msgid "Do not forget to remove %s or rename it manually to %s."
+#~ msgstr ""
+
+#, fuzzy, c-format
+#~ msgid "System error while reading ShaDa file: %s"
+#~ msgstr "E782: virhe luettaessa .sug-tiedostoa: %s"
+
+#, fuzzy, c-format
+#~ msgid "System error while reading integer from ShaDa file: %s"
+#~ msgstr "E782: virhe luettaessa .sug-tiedostoa: %s"
+
+#, c-format
+#~ msgid ""
+#~ "Error while reading ShaDa file: expected positive integer at position "
+#~ "%<PRIu64>, but got nothing"
+#~ msgstr ""
-#: ../spell.c:951
-msgid "E759: Format error in spell file"
-msgstr "E759: Muotoiluvirhe oikolukutiedostossa"
+#, c-format
+#~ msgid ""
+#~ "Error while reading ShaDa file: expected positive integer at position "
+#~ "%<PRIu64>"
+#~ msgstr ""
+
+#. kSDItemUnknown cannot possibly pass that far because it is -1 and that
+#. will fail in msgpack_read_uint64. But kSDItemMissing may and it will
+#. otherwise be skipped because (1 << 0) will never appear in flags.
+#, c-format
+#~ msgid ""
+#~ "Error while reading ShaDa file: there is an item at position %<PRIu64> that "
+#~ "must not be there: Missing items are for internal uses only"
+#~ msgstr ""
+
+#, c-format
+#~ msgid ""
+#~ "Error while reading ShaDa file: buffer list at position %<PRIu64> contains "
+#~ "entry that is not a dictionary"
+#~ msgstr ""
+
+#, c-format
+#~ msgid ""
+#~ "Error while reading ShaDa file: buffer list at position %<PRIu64> contains "
+#~ "entry with invalid line number"
+#~ msgstr ""
+
+#, c-format
+#~ msgid ""
+#~ "Error while reading ShaDa file: buffer list at position %<PRIu64> contains "
+#~ "entry with invalid column number"
+#~ msgstr ""
+
+#, c-format
+#~ msgid ""
+#~ "Error while reading ShaDa file: buffer list at position %<PRIu64> contains "
+#~ "entry that does not have a file name"
+#~ msgstr ""
+
+#. values for ts_isdiff
+#. no different byte (yet)
+#. different byte found
+#. inserting character
+#. values for ts_flags
+#. already checked that prefix is OK
+#. tried split at this point
+#. did a delete, "ts_delidx" has index
+#. special values ts_prefixdepth
+#. not using prefixes
+#. walking through the prefix tree
+#. highest value that's not special
+#. mode values for find_word
+#. find word case-folded
+#. find keep-case word
+#. find word after prefix
+#. find case-folded compound word
+#. find keep-case compound word
+#, fuzzy
+#~ msgid "E759: Format error in spell file"
+#~ msgstr "E297: Kirjoitusvirhe swap-tiedostossa"
+
+msgid "E756: Spell checking is not enabled"
+msgstr "E756: Oikaisuluku ei ole päällä"
+
+#, c-format
+msgid "Warning: Cannot find word list \"%s.%s.spl\" or \"%s.ascii.spl\""
+msgstr "Varoitus: Ei löydetty sanalistaa %s.%s.spl tai %s.ascii.spl"
+
+#. This is probably an error. Give a warning and
+#. accept the words anyway.
+#, c-format
+msgid "Warning: region %s not supported"
+msgstr "Varoitus: osaa %s ei tueta"
+
+msgid "Sorry, no suggestions"
+msgstr "ei ehdotuksia"
+
+#, fuzzy, c-format
+#~ msgid "Sorry, only %<PRId64> suggestions"
+#~ msgstr "vain %ld ehdotusta"
+
+#. for when 'cmdheight' > 1
+#. avoid more prompt
+#, c-format
+msgid "Change \"%.*s\" to:"
+msgstr "Muuta %.*s:"
+
+#, c-format
+msgid " < \"%.*s\""
+msgstr " < %.*s"
+
+msgid "E752: No previous spell replacement"
+msgstr "E752: Ei edellistä oikaisulukukorjausta"
+
+#, c-format
+msgid "E753: Not found: %s"
+msgstr "E753: Ei löytynyt: %s"
-#: ../spell.c:952
msgid "E758: Truncated spell file"
msgstr "E758: Oikolukutiedosto katkaistu"
-#: ../spell.c:953
#, c-format
msgid "Trailing text in %s line %d: %s"
-msgstr "Teksti rivin perss tiedostossa %s rivill %d: %s"
+msgstr "Tekstiä rivin perässä tiedostossa %s rivillä %d: %s"
-#: ../spell.c:954
#, c-format
msgid "Affix name too long in %s line %d: %s"
-msgstr "Affiksin nimi on liian pitk tiedostossa %s rivill %d: %s"
+msgstr "Affiksin nimi on liian pitkä tiedostossa %s rivillä %d: %s"
-#: ../spell.c:955
msgid "E761: Format error in affix file FOL, LOW or UPP"
msgstr "E761: Affiksitiedoston FOL-, LOW- tai UPP-muotovirhe "
-#: ../spell.c:957
msgid "E762: Character in FOL, LOW or UPP is out of range"
-msgstr "E762: Merkki FOL:ss, LOW:ss tai UPP:ss ei kuulu arvoalueeseen"
+msgstr "E762: Merkki FOL:ssä, LOW:ssä tai UPP:ssä ei kuulu arvoalueeseen"
-#: ../spell.c:958
msgid "Compressing word tree..."
-msgstr "Tiivistetn sanapuuta..."
-
-#: ../spell.c:1951
-msgid "E756: Spell checking is not enabled"
-msgstr "E756: Oikaisuluku ei ole pll"
-
-#: ../spell.c:2249
-#, c-format
-msgid "Warning: Cannot find word list \"%s.%s.spl\" or \"%s.ascii.spl\""
-msgstr "Varoitus: Ei lydetty sanalistaa %s.%s.spl tai %s.ascii.spl"
+msgstr "Tiivistetään sanapuuta..."
-#: ../spell.c:2473
#, c-format
msgid "Reading spell file \"%s\""
msgstr "Luetaan oikaisulukutiedosta %s"
-#: ../spell.c:2496
msgid "E757: This does not look like a spell file"
msgstr "E757: Ei vaikuta oikaisulukutiedostolta"
-#: ../spell.c:2501
+#, fuzzy, c-format
+#~ msgid "E5042: Failed to read spell file %s: %s"
+#~ msgstr "E482: Tiedostoa %s ei voi luoda"
+
msgid "E771: Old spell file, needs to be updated"
-msgstr "E771: Vanha oikaisulukutiedosto vaatii pivittmist"
+msgstr "E771: Vanha oikaisulukutiedosto vaatii päivittämistä"
-#: ../spell.c:2504
msgid "E772: Spell file is for newer version of Vim"
msgstr "E772: Oikaisulukutiedosto on uudemmalle Vimille"
-#: ../spell.c:2602
msgid "E770: Unsupported section in spell file"
msgstr "E770: Tukematon osio oikaisulukutiedostossa"
-#: ../spell.c:3762
#, c-format
-msgid "Warning: region %s not supported"
-msgstr "Varoitus: osaa %s ei tueta"
+msgid "E778: This does not look like a .sug file: %s"
+msgstr "E778: Ei vaikuta .sug-tiedostolta: %s"
+
+#, c-format
+msgid "E779: Old .sug file, needs to be updated: %s"
+msgstr "E779: Vanha .sug-tiedosto pitää päivittää: %s"
+
+#, c-format
+msgid "E780: .sug file is for newer version of Vim: %s"
+msgstr "E780: .sug-tiedosto on uudemmalle Vimille: %s"
+
+#, c-format
+msgid "E781: .sug file doesn't match .spl file: %s"
+msgstr "E781: .sug-tiedosto ei täsmää .spl-tiedostoon: %s"
+
+#, c-format
+msgid "E782: error while reading .sug file: %s"
+msgstr "E782: virhe luettaessa .sug-tiedostoa: %s"
-#: ../spell.c:4550
#, c-format
msgid "Reading affix file %s ..."
msgstr "Luetaan affiksitiedostoa %s..."
-#: ../spell.c:4589 ../spell.c:5635 ../spell.c:6140
#, c-format
msgid "Conversion failure for word in %s line %d: %s"
-msgstr "Muunnosvirhe sanalle %s rivill %d: %s"
+msgstr "Muunnosvirhe sanalle %s rivillä %d: %s"
-#: ../spell.c:4630 ../spell.c:6170
#, c-format
msgid "Conversion in %s not supported: from %s to %s"
msgstr "Muunnosta kohteessa %s ei tueta: kohteesta %s kohteeseen %s"
-#: ../spell.c:4642
#, c-format
msgid "Invalid value for FLAG in %s line %d: %s"
-msgstr "Tuntematon FLAG kohteessa %s rivill %d: %s"
+msgstr "Tuntematon FLAG kohteessa %s rivillä %d: %s"
-#: ../spell.c:4655
#, c-format
msgid "FLAG after using flags in %s line %d: %s"
-msgstr "FLAG kohteessa %s lippujen jlkeen rivill %d: %s"
+msgstr "FLAG kohteessa %s lippujen jälkeen rivillä %d: %s"
-#: ../spell.c:4723
#, c-format
msgid ""
"Defining COMPOUNDFORBIDFLAG after PFX item may give wrong results in %s line "
"%d"
msgstr ""
-"COMPOUNDFORBIDFLAG PFX:n jlkeen voi antaa vri tuloksia kohteessa %s "
-"rivill %d"
+"COMPOUNDFORBIDFLAG PFX:n jälkeen voi antaa vääriä tuloksia kohteessa %s "
+"rivillä %d"
-#: ../spell.c:4731
#, c-format
msgid ""
"Defining COMPOUNDPERMITFLAG after PFX item may give wrong results in %s line "
"%d"
msgstr ""
-"COMPOUNDPERMITFLAG PFX:n jlkeen voi antaa vri tuloksia kohteessa %s "
-"rivill %d"
+"COMPOUNDPERMITFLAG PFX:n jälkeen voi antaa vääriä tuloksia kohteessa %s "
+"rivillä %d"
-#: ../spell.c:4747
#, c-format
msgid "Wrong COMPOUNDRULES value in %s line %d: %s"
-msgstr "Vr COMPOUNDRULES-arvo kohteessa %s rivill %d: %s"
+msgstr "Väärä COMPOUNDRULES-arvo kohteessa %s rivillä %d: %s"
-#: ../spell.c:4771
#, c-format
msgid "Wrong COMPOUNDWORDMAX value in %s line %d: %s"
-msgstr "Vr COMPOUNDWORDMAX-arvo kohteessa %s rivill %d: %s"
+msgstr "Väärä COMPOUNDWORDMAX-arvo kohteessa %s rivillä %d: %s"
-#: ../spell.c:4777
#, c-format
msgid "Wrong COMPOUNDMIN value in %s line %d: %s"
-msgstr "Vr COMPOUNDMIN-arvo kohteessa %s rivill %d: %s"
+msgstr "Väärä COMPOUNDMIN-arvo kohteessa %s rivillä %d: %s"
-#: ../spell.c:4783
#, c-format
msgid "Wrong COMPOUNDSYLMAX value in %s line %d: %s"
-msgstr "Vr COMPOUNDSYLMAX-arvo kohteessa %s rivill %d: %s"
+msgstr "Väärä COMPOUNDSYLMAX-arvo kohteessa %s rivillä %d: %s"
-#: ../spell.c:4795
#, c-format
msgid "Wrong CHECKCOMPOUNDPATTERN value in %s line %d: %s"
-msgstr "Vr CHECKCOMPOUNDPATTERN-arvo kohteessa %s rivill %d: %s"
+msgstr "Väärä CHECKCOMPOUNDPATTERN-arvo kohteessa %s rivillä %d: %s"
-#: ../spell.c:4847
#, c-format
msgid "Different combining flag in continued affix block in %s line %d: %s"
msgstr ""
-"Eri yhdistelmlippu jatketussa affiksilohkossa kohteessa %s rivill %d: %s"
+"Eri yhdistelmälippu jatketussa affiksilohkossa kohteessa %s rivillä %d: %s"
-#: ../spell.c:4850
#, c-format
msgid "Duplicate affix in %s line %d: %s"
-msgstr "Kaksoiskappale affiksista kohteessa %s rivill %d: %s"
+msgstr "Kaksoiskappale affiksista kohteessa %s rivillä %d: %s"
-#: ../spell.c:4871
-#, c-format
+#, fuzzy, c-format
msgid ""
-"Affix also used for BAD/RARE/KEEPCASE/NEEDAFFIX/NEEDCOMPOUND/NOSUGGEST in %s "
+"Affix also used for BAD/RARE/KEEPCASE/NEEDAFFIX/NEEDCOMPOUND/NOSUGGESTin %s "
"line %d: %s"
msgstr ""
-"Affiksia kytetty mys BAD-, RARE-, KEEPCASE-, NEEDAFFIX-, NEEDCOMPOUND- tai "
-"NOSUGGEST-arvossa kohteessa %s rivill %d: %s"
+"Affiksia käytetty myös BAD-, RARE-, KEEPCASE-, NEEDAFFIX-, NEEDCOMPOUND- tai "
+"NOSUGGEST-arvossa kohteessa %s rivillä %d: %s"
-#: ../spell.c:4893
#, c-format
msgid "Expected Y or N in %s line %d: %s"
-msgstr "Odotettiin Y:t tai N: kohteessa %s rivill %d: %s"
+msgstr "Odotettiin Y:tä tai N:ää kohteessa %s rivillä %d: %s"
-#: ../spell.c:4968
#, c-format
msgid "Broken condition in %s line %d: %s"
-msgstr "Viallinen ehto kohteessa %s rivill %d: %s"
+msgstr "Viallinen ehto kohteessa %s rivillä %d: %s"
-#: ../spell.c:5091
#, c-format
msgid "Expected REP(SAL) count in %s line %d"
-msgstr "Odotettiin REP(SAL)-arvoa kohteessa %s rivill %d"
+msgstr "Odotettiin REP(SAL)-arvoa kohteessa %s rivillä %d"
-#: ../spell.c:5120
#, c-format
msgid "Expected MAP count in %s line %d"
-msgstr "Odotettiin MAP-arvoa kohteessa %s rivill %d"
+msgstr "Odotettiin MAP-arvoa kohteessa %s rivillä %d"
-#: ../spell.c:5132
#, c-format
msgid "Duplicate character in MAP in %s line %d"
-msgstr "Kaksoiskappale merkist MAP:ss kohteessa %s rivill %d"
+msgstr "Kaksoiskappale merkistä MAP:ssä kohteessa %s rivillä %d"
-#: ../spell.c:5176
#, c-format
msgid "Unrecognized or duplicate item in %s line %d: %s"
-msgstr "Tunnistamaton tai kaksoiskappale arvosta kohteessa %s rivill %d: %s"
+msgstr "Tunnistamaton tai kaksoiskappale arvosta kohteessa %s rivillä %d: %s"
-#: ../spell.c:5197
#, c-format
msgid "Missing FOL/LOW/UPP line in %s"
msgstr "Puuttuva FOL, LOW tai UPP rivi kohteessa %s"
-#: ../spell.c:5220
msgid "COMPOUNDSYLMAX used without SYLLABLE"
msgstr "COMPOUNDSYLMAX ilman SYLLABLEa"
-#: ../spell.c:5236
msgid "Too many postponed prefixes"
-msgstr "Liikaa jlkikteistettyj prefiksej"
+msgstr "Liikaa jälkikäteistettyjä prefiksejä"
-#: ../spell.c:5238
msgid "Too many compound flags"
msgstr "Liikaa yhdyssanalippuja"
-#: ../spell.c:5240
msgid "Too many postponed prefixes and/or compound flags"
-msgstr "Liikaa jlkikteistettyj prefiksej tai yhdyssanalippuja"
+msgstr "Liikaa jälkikäteistettyjä prefiksejä tai yhdyssanalippuja"
-#: ../spell.c:5250
#, c-format
msgid "Missing SOFO%s line in %s"
msgstr "Puuttuva SOFO%s-rivi kohteessa %s"
-#: ../spell.c:5253
#, c-format
msgid "Both SAL and SOFO lines in %s"
msgstr "SAL- ja SOFO-rivit kohteessa %s"
-#: ../spell.c:5331
#, c-format
msgid "Flag is not a number in %s line %d: %s"
-msgstr "Lippu ei ole lukuarvo kohteessa %s rivill %d: %s"
+msgstr "Lippu ei ole lukuarvo kohteessa %s rivillä %d: %s"
-#: ../spell.c:5334
#, c-format
msgid "Illegal flag in %s line %d: %s"
-msgstr "Tuntematon lippu kohteessa %s rivill %d: %s"
+msgstr "Tuntematon lippu kohteessa %s rivillä %d: %s"
-#: ../spell.c:5493 ../spell.c:5501
#, c-format
msgid "%s value differs from what is used in another .aff file"
msgstr "%s-arvo eroaa toisessa .aff-tiedostossa olevasta"
-#: ../spell.c:5602
#, c-format
msgid "Reading dictionary file %s ..."
msgstr "Luetaan sanakirjatiedostoa %s"
-#: ../spell.c:5611
#, c-format
msgid "E760: No word count in %s"
msgstr "E760: Ei sanalaskuria kohteessa %s"
-#: ../spell.c:5669
#, c-format
msgid "line %6d, word %6d - %s"
msgstr "rivi %6d, sana %6d - %s"
-#: ../spell.c:5691
#, c-format
msgid "Duplicate word in %s line %d: %s"
-msgstr "Toistettu sana kohteessa %s rivill %d: %s"
+msgstr "Toistettu sana kohteessa %s rivillä %d: %s"
-#: ../spell.c:5694
#, c-format
msgid "First duplicate word in %s line %d: %s"
-msgstr "Ensimminen kappale kohteessa %s rivill %d: %s"
+msgstr "Ensimmäinen kappale kohteessa %s rivillä %d: %s"
-#: ../spell.c:5746
#, c-format
msgid "%d duplicate word(s) in %s"
msgstr "toistettuja sanoja %d kohteessa %s"
-#: ../spell.c:5748
#, c-format
msgid "Ignored %d word(s) with non-ASCII characters in %s"
msgstr "Ei-ASCII-merkkien takia ohitettuja sanoja %d kohteessa %s"
-#: ../spell.c:6115
#, c-format
msgid "Reading word file %s ..."
msgstr "Luetaan sanatiedostoa %s..."
-#: ../spell.c:6155
#, c-format
msgid "Duplicate /encoding= line ignored in %s line %d: %s"
-msgstr "Toistettu /encoding= ohitettu kohteessa %s rivill %d: %s"
+msgstr "Toistettu /encoding= ohitettu kohteessa %s rivillä %d: %s"
-#: ../spell.c:6159
#, c-format
msgid "/encoding= line after word ignored in %s line %d: %s"
-msgstr "/encoding= sanojen jlkeen ohitettu kohteessa %s rivill %d: %s"
+msgstr "/encoding= sanojen jälkeen ohitettu kohteessa %s rivillä %d: %s"
-#: ../spell.c:6180
#, c-format
msgid "Duplicate /regions= line ignored in %s line %d: %s"
-msgstr "Toistettu /regions= ohitettu kohteessa %s rivill %d: %s"
+msgstr "Toistettu /regions= ohitettu kohteessa %s rivillä %d: %s"
-#: ../spell.c:6185
#, c-format
msgid "Too many regions in %s line %d: %s"
-msgstr "Liikaa regionseja kohteessa %s rivill %d: %s"
+msgstr "Liikaa regionseja kohteessa %s rivillä %d: %s"
-#: ../spell.c:6198
#, c-format
msgid "/ line ignored in %s line %d: %s"
-msgstr "/ ohitettu kohteessa %s rivill %d: %s"
+msgstr "/ ohitettu kohteessa %s rivillä %d: %s"
-#: ../spell.c:6224
#, c-format
msgid "Invalid region nr in %s line %d: %s"
-msgstr "Virheellinen region-luku kohteessa %s rivill %d: %s"
+msgstr "Virheellinen region-luku kohteessa %s rivillä %d: %s"
-#: ../spell.c:6230
#, c-format
msgid "Unrecognized flags in %s line %d: %s"
-msgstr "Tunnistamaton lippu kohteessa %s rivill %d: %s"
+msgstr "Tunnistamaton lippu kohteessa %s rivillä %d: %s"
-#: ../spell.c:6257
#, c-format
msgid "Ignored %d words with non-ASCII characters"
msgstr "Ei-ASCIIn takia ohitettuja sanoja %d"
-#: ../spell.c:6656
#, c-format
msgid "Compressed %d of %d nodes; %d (%d%%) remaining"
-msgstr "Tiivistetty %d/%d noodia. %d (%d %%) jljell"
+msgstr "Tiivistetty %d/%d noodia. %d (%d %%) jäljellä"
-#: ../spell.c:7340
msgid "Reading back spell file..."
msgstr "Luetaan taas oikaisulukutiedostoa..."
#. Go through the trie of good words, soundfold each word and add it to
#. the soundfold trie.
-#: ../spell.c:7357
msgid "Performing soundfolding..."
-msgstr "ntmyksen mukaan yhdistelln..."
+msgstr "Ääntämyksen mukaan yhdistellään..."
-#: ../spell.c:7368
-#, c-format
-msgid "Number of words after soundfolding: %<PRId64>"
-msgstr "Sanoja ntmysyhdistelyn jlkeen: %<PRId64>"
+#, fuzzy, c-format
+#~ msgid "Number of words after soundfolding: %<PRId64>"
+#~ msgstr "Sanoja ääntämysyhdistelyn jälkeen: %ld"
-#: ../spell.c:7476
#, c-format
msgid "Total number of words: %d"
-msgstr "Sanoja yhteens: %d"
+msgstr "Sanoja yhteensä: %d"
-#: ../spell.c:7655
#, c-format
msgid "Writing suggestion file %s ..."
msgstr "Kirjoitetaan ehdotustiedostoa %s..."
-#: ../spell.c:7707 ../spell.c:7927
#, c-format
msgid "Estimated runtime memory use: %d bytes"
-msgstr "Arvioitu kyttmuisti: %d tavua"
+msgstr "Arvioitu käyttömuisti: %d tavua"
-#: ../spell.c:7820
msgid "E751: Output file name must not have region name"
-msgstr "E751: Tulostetiedostonimess ei saa olla alueen nime"
+msgstr "E751: Tulostetiedostonimessä ei saa olla alueen nimeä"
-#: ../spell.c:7822
msgid "E754: Only up to 8 regions supported"
-msgstr "E754: Enintn 8 aluetta tuetaan"
+msgstr "E754: Enintään 8 aluetta tuetaan"
-#: ../spell.c:7846
#, c-format
msgid "E755: Invalid region in %s"
msgstr "E755: Virheellinen alue kohteelle %s"
-#: ../spell.c:7907
msgid "Warning: both compounding and NOBREAK specified"
-msgstr "Varoitus: sek yhdyssanamuodostus ett NOBREAK kytss"
+msgstr "Varoitus: sekä yhdyssanamuodostus että NOBREAK käytössä"
-#: ../spell.c:7920
#, c-format
msgid "Writing spell file %s ..."
msgstr "Kirjoitetaan oikaisulukutiedostoa %s..."
-#: ../spell.c:7925
msgid "Done!"
msgstr "Valmista."
-#: ../spell.c:8034
-#, c-format
-msgid "E765: 'spellfile' does not have %<PRId64> entries"
-msgstr "E765: spellfile ei sisll %<PRId64> kohtaa"
-
-#: ../spell.c:8074
#, fuzzy, c-format
-msgid "Word '%.*s' removed from %s"
-msgstr "Sana poistettu kohteesta %s"
+#~ msgid "E765: 'spellfile' does not have %<PRId64> entries"
+#~ msgstr "E765: spellfile ei sisällä %ld kohtaa"
-#: ../spell.c:8117
-#, fuzzy, c-format
-msgid "Word '%.*s' added to %s"
-msgstr "Sana listty kohteeseen %s"
-
-#: ../spell.c:8381
-msgid "E763: Word characters differ between spell files"
-msgstr "E763: Sanan merkit muuttuvat oikaisulukutiedostojen vlill"
-
-#: ../spell.c:8684
-msgid "Sorry, no suggestions"
-msgstr "Sori, ei ehdotuksia"
-
-#: ../spell.c:8687
-#, c-format
-msgid "Sorry, only %<PRId64> suggestions"
-msgstr "Sori, vain %<PRId64> ehdotusta"
-
-#. for when 'cmdheight' > 1
-#. avoid more prompt
-#: ../spell.c:8704
-#, c-format
-msgid "Change \"%.*s\" to:"
-msgstr "Muuta %.*s:"
-
-#: ../spell.c:8737
-#, c-format
-msgid " < \"%.*s\""
-msgstr " < %.*s"
-
-#: ../spell.c:8882
-msgid "E752: No previous spell replacement"
-msgstr "E752: Ei edellist oikaisulukukorjausta"
-
-#: ../spell.c:8925
-#, c-format
-msgid "E753: Not found: %s"
-msgstr "E753: Ei lytynyt: %s"
-
-#: ../spell.c:9276
-#, c-format
-msgid "E778: This does not look like a .sug file: %s"
-msgstr "E778: Ei vaikuta .sug-tiedostolta: %s"
-
-#: ../spell.c:9282
-#, c-format
-msgid "E779: Old .sug file, needs to be updated: %s"
-msgstr "E779: Vanha .sug-tiedosto pit pivitt: %s"
-
-#: ../spell.c:9286
#, c-format
-msgid "E780: .sug file is for newer version of Vim: %s"
-msgstr "E780: .sug-tiedosto on uudemmalle Vimille: %s"
+msgid "Word '%.*s' removed from %s"
+msgstr "Sana %.*s poistettu kohteesta %s"
-#: ../spell.c:9295
#, c-format
-msgid "E781: .sug file doesn't match .spl file: %s"
-msgstr "E781: .sug-tiedosto ei tsm .spl-tiedostoon: %s"
+msgid "Word '%.*s' added to %s"
+msgstr "Sana %.*s lisätty kohteeseen %s"
-#: ../spell.c:9305
-#, c-format
-msgid "E782: error while reading .sug file: %s"
-msgstr "E782: virhe luettaessa .sug-tiedostoa: %s"
+msgid "E763: Word characters differ between spell files"
+msgstr "E763: Sanan merkit muuttuvat oikaisulukutiedostojen välillä"
#. This should have been checked when generating the .spl
#. file.
-#: ../spell.c:11575
msgid "E783: duplicate char in MAP entry"
-msgstr "E783: kaksoiskappale merkist MAP-kohdassa"
+msgstr "E783: kaksoiskappale merkistä MAP-kohdassa"
+
+msgid "E766: Insufficient arguments for printf()"
+msgstr "E766: printf():lle ei annettu tarpeeksi argumentteja"
+
+msgid "E807: Expected Float argument for printf()"
+msgstr "E807: Odotettiin Float-argumenttia printf():lle"
+
+msgid "E767: Too many arguments to printf()"
+msgstr "E767: printf():lle annettiin liikaa argumentteja"
-#: ../syntax.c:266
msgid "No Syntax items defined for this buffer"
-msgstr "Ei syntaksikohteita tlle puskurille"
+msgstr "Ei syntaksikohteita tälle puskurille"
-#: ../syntax.c:3083 ../syntax.c:3104 ../syntax.c:3127
#, c-format
msgid "E390: Illegal argument: %s"
msgstr "E390: Virheellinen argumentti: %s"
-#: ../syntax.c:3299
+msgid "syntax iskeyword "
+msgstr "syntax iskeyword "
+
#, c-format
msgid "E391: No such syntax cluster: %s"
msgstr "E391: Syntaksiklusteri puuttuu: %s"
-#: ../syntax.c:3433
msgid "syncing on C-style comments"
msgstr "synkkaa C-tyylin kommentteihin"
-#: ../syntax.c:3439
msgid "no syncing"
msgstr "ei synkkausta"
-#: ../syntax.c:3441
msgid "syncing starts "
msgstr "synkkaus aloitettu "
-#: ../syntax.c:3443 ../syntax.c:3506
msgid " lines before top line"
-msgstr " rivi ennen alkua"
+msgstr " riviä ennen alkua"
-#: ../syntax.c:3448
msgid ""
"\n"
"--- Syntax sync items ---"
@@ -5729,7 +5225,6 @@ msgstr ""
"\n"
"--- Syntax sync -kohteet ---"
-#: ../syntax.c:3452
msgid ""
"\n"
"syncing on items"
@@ -5737,7 +5232,6 @@ msgstr ""
"\n"
"synkataan kohteisiin"
-#: ../syntax.c:3457
msgid ""
"\n"
"--- Syntax items ---"
@@ -5745,2314 +5239,2499 @@ msgstr ""
"\n"
"--- Syntax-kohteet ---"
-#: ../syntax.c:3475
#, c-format
msgid "E392: No such syntax cluster: %s"
msgstr "E392: syntaksiklusteria ei ole: %s"
-#: ../syntax.c:3497
msgid "minimal "
-msgstr "vhintn "
+msgstr "vähintään "
-#: ../syntax.c:3503
msgid "maximal "
-msgstr "enitntn "
+msgstr "enitntään "
-#: ../syntax.c:3513
msgid "; match "
-msgstr "; tsm "
+msgstr "; täsmää "
-#: ../syntax.c:3515
msgid " line breaks"
msgstr " rivinvaihdot"
-#: ../syntax.c:4076
msgid "E395: contains argument not accepted here"
-msgstr "E395: contains ei sovi thn"
+msgstr "E395: contains ei sovi tähän"
-#: ../syntax.c:4096
-#, fuzzy
msgid "E844: invalid cchar value"
-msgstr "E474: Virheellinen argumentti"
+msgstr "E844: Virheellinen cchar-arvo"
-#: ../syntax.c:4107
msgid "E393: group[t]here not accepted here"
-msgstr "E393: group[t]here ei sovi thn"
+msgstr "E393: group[t]here ei sovi tähän"
-#: ../syntax.c:4126
#, c-format
msgid "E394: Didn't find region item for %s"
-msgstr "E394: Aluetta nimelle %s ei lydy"
+msgstr "E394: Aluetta nimelle %s ei löydy"
-#: ../syntax.c:4188
msgid "E397: Filename required"
msgstr "E397: Tiedostonimi puuttuu"
-#: ../syntax.c:4221
-#, fuzzy
msgid "E847: Too many syntax includes"
-msgstr "E77: Liikaa tiedostonimi"
+msgstr "E847: Liikaa syntax includeja"
-#: ../syntax.c:4303
#, c-format
msgid "E789: Missing ']': %s"
msgstr "E789: ] puuttuu: %s"
-#: ../syntax.c:4531
+#, c-format
+msgid "E890: trailing char after ']': %s]%s"
+msgstr "E890: Ylimääräisiä merkkejä merkin ] perässä: %s]%s"
+
#, c-format
msgid "E398: Missing '=': %s"
msgstr "E398: = puuttuu: %s"
-#: ../syntax.c:4666
#, c-format
msgid "E399: Not enough arguments: syntax region %s"
msgstr "E399: Argumentteja puuttuu: syntaksialue %s"
-#: ../syntax.c:4870
-#, fuzzy
msgid "E848: Too many syntax clusters"
-msgstr "E391: Syntaksiklusteri puuttuu: %s"
+msgstr "E848: Liikaa syntaksiklustereita"
-#: ../syntax.c:4954
msgid "E400: No cluster specified"
-msgstr "E400: klusteri mrittelemtt"
+msgstr "E400: klusteri määrittelemättä"
#. end delimiter not found
-#: ../syntax.c:4986
#, c-format
msgid "E401: Pattern delimiter not found: %s"
msgstr "E401: Kuvoin erotin puuttuu: %s"
-#: ../syntax.c:5049
#, c-format
msgid "E402: Garbage after pattern: %s"
-msgstr "E402: Roskia kuvion jljess: %s"
+msgstr "E402: Roskia kuvion jäljessä: %s"
-#: ../syntax.c:5120
msgid "E403: syntax sync: line continuations pattern specified twice"
-msgstr "E403: syntax sync: rivinjatkamiskuvio mritelty kahdesti"
+msgstr "E403: syntax sync: rivinjatkamiskuvio määritelty kahdesti"
-#: ../syntax.c:5169
#, c-format
msgid "E404: Illegal arguments: %s"
msgstr "E404: Virheelliset argumentit: %s"
-#: ../syntax.c:5217
#, c-format
msgid "E405: Missing equal sign: %s"
msgstr "E405: = puuttuu: %s"
-#: ../syntax.c:5222
#, c-format
msgid "E406: Empty argument: %s"
-msgstr "E406: Tyhj argumentti: %s"
+msgstr "E406: Tyhjä argumentti: %s"
-#: ../syntax.c:5240
#, c-format
msgid "E407: %s not allowed here"
-msgstr "E407: %s ei sovi thn"
+msgstr "E407: %s ei sovi tähän"
-#: ../syntax.c:5246
#, c-format
msgid "E408: %s must be first in contains list"
msgstr "E408: %s kuuluu contains-listan alkuun"
-#: ../syntax.c:5304
#, c-format
msgid "E409: Unknown group name: %s"
-msgstr "E409: Tuntematon ryhmn nimi: %s"
+msgstr "E409: Tuntematon ryhmän nimi: %s"
-#: ../syntax.c:5512
#, c-format
msgid "E410: Invalid :syntax subcommand: %s"
msgstr "E410: Virheelluinen :syntax-osakomento: %s"
-#: ../syntax.c:5854
msgid ""
" TOTAL COUNT MATCH SLOWEST AVERAGE NAME PATTERN"
msgstr ""
+" KAIKKI MÄÄRÄ TÄSMÄYS HITAIN KEKSIARVO NIMI ILMAUS"
-#: ../syntax.c:6146
msgid "E679: recursive loop loading syncolor.vim"
-msgstr "E679: rekursiivinen silmukka syncolor.vimiss"
+msgstr "E679: rekursiivinen silmukka syncolor.vimissä"
-#: ../syntax.c:6256
#, c-format
msgid "E411: highlight group not found: %s"
-msgstr "E411: korostusryhm ei lytynyt: %s"
+msgstr "E411: korostusryhmää ei löytynyt: %s"
-#: ../syntax.c:6278
#, c-format
msgid "E412: Not enough arguments: \":highlight link %s\""
msgstr "E412: Argumentteja puuttuu: :highlight link %s"
-#: ../syntax.c:6284
#, c-format
msgid "E413: Too many arguments: \":highlight link %s\""
msgstr "E413: Liikaa argumentteja: :highlight link %s"
-#: ../syntax.c:6302
msgid "E414: group has settings, highlight link ignored"
-msgstr "E414: ryhmll on asetuksia, highlight link -komento ohitetaan"
+msgstr "E414: ryhmällä on asetuksia, highlight link -komento ohitetaan"
-#: ../syntax.c:6367
#, c-format
msgid "E415: unexpected equal sign: %s"
msgstr "E415: odotuksenvastainen =-merkki: %s"
-#: ../syntax.c:6395
#, c-format
msgid "E416: missing equal sign: %s"
msgstr "E416: puuttuva =-merkki: %s"
-#: ../syntax.c:6418
#, c-format
msgid "E417: missing argument: %s"
msgstr "E417: puuttuva argumentti: %s"
-#: ../syntax.c:6446
#, c-format
msgid "E418: Illegal value: %s"
msgstr "E418: Viallinen arvo: %s"
-#: ../syntax.c:6496
msgid "E419: FG color unknown"
-msgstr "E419: edustavri tuntematon"
+msgstr "E419: edustaväri tuntematon"
-#: ../syntax.c:6504
msgid "E420: BG color unknown"
-msgstr "E420: taustavri tuntematon"
+msgstr "E420: taustaväri tuntematon"
-#: ../syntax.c:6564
#, c-format
msgid "E421: Color name or number not recognized: %s"
-msgstr "E421: Vrin nimi tai numero tuntematon: %s"
-
-#: ../syntax.c:6714
-#, c-format
-msgid "E422: terminal code too long: %s"
-msgstr "E422: terminaalikoodi liian pitk: %s"
+msgstr "E421: Värin nimi tai numero tuntematon: %s"
-#: ../syntax.c:6753
#, c-format
msgid "E423: Illegal argument: %s"
msgstr "E423: Virheellinen argumentti: %s"
-#: ../syntax.c:6925
msgid "E424: Too many different highlighting attributes in use"
msgstr "E424: Liikaa eri korostusattribuutteja"
-#: ../syntax.c:7427
msgid "E669: Unprintable character in group name"
-msgstr "E669: Tulostuskelvoton merkki ryhmn nimess"
+msgstr "E669: Tulostuskelvoton merkki ryhmän nimessä"
-#: ../syntax.c:7434
msgid "W18: Invalid character in group name"
-msgstr "W18: Virheellinen merkki ryhmn nimess"
+msgstr "W18: Virheellinen merkki ryhmän nimessä"
-#: ../syntax.c:7448
msgid "E849: Too many highlight and syntax groups"
-msgstr ""
+msgstr "E849: Liikaa korostuksia ja syntaksiryhmiä"
-#: ../tag.c:104
msgid "E555: at bottom of tag stack"
-msgstr "E555: tgipinon pohja"
+msgstr "E555: tägipinon pohja"
-#: ../tag.c:105
msgid "E556: at top of tag stack"
-msgstr "E556: tgipinon huippu"
+msgstr "E556: tägipinon huippu"
-#: ../tag.c:380
msgid "E425: Cannot go before first matching tag"
-msgstr "E425: Ei voida menn ensimmist tsmv tgi alummaksi"
+msgstr "E425: Ei voida mennä ensimmäistä täsmäävää tägiä alummaksi"
-#: ../tag.c:504
#, c-format
msgid "E426: tag not found: %s"
-msgstr "E426: tgi puuttuu: %s"
+msgstr "E426: tägi puuttuu: %s"
-#: ../tag.c:528
msgid " # pri kind tag"
-msgstr " # arvo tyyppi tgi"
+msgstr " # arvo tyyppi tägi"
-#: ../tag.c:531
msgid "file\n"
msgstr "tiedosto\n"
-#: ../tag.c:829
msgid "E427: There is only one matching tag"
-msgstr "E427: Vain yksi tgi tsm"
+msgstr "E427: Vain yksi tägi täsmää"
-#: ../tag.c:831
msgid "E428: Cannot go beyond last matching tag"
-msgstr "E428: Ei voida edet viimeisen tsmvn tgin ohi"
+msgstr "E428: Ei voida edetä viimeisen täsmäävän tägin ohi"
-#: ../tag.c:850
#, c-format
msgid "File \"%s\" does not exist"
msgstr "Tiedostoa %s ei ole"
#. Give an indication of the number of matching tags
-#: ../tag.c:859
#, c-format
msgid "tag %d of %d%s"
-msgstr "tgi %d/%d%s"
+msgstr "tägi %d/%d%s"
-#: ../tag.c:862
msgid " or more"
msgstr " tai useammasta"
-#: ../tag.c:864
msgid " Using tag with different case!"
-msgstr " Tgiss eri kirjaintaso"
+msgstr " Tägissä eri kirjaintaso"
-#: ../tag.c:909
#, c-format
msgid "E429: File \"%s\" does not exist"
msgstr "E429: Tiedostoa %s ei ole"
#. Highlight title
-#: ../tag.c:960
msgid ""
"\n"
" # TO tag FROM line in file/text"
msgstr ""
"\n"
-" # TILL tagg FRN LINJE i fil/text"
+" # TILL tagg FRÅN LINJE i fil/text"
-#: ../tag.c:1303
#, c-format
msgid "Searching tags file %s"
-msgstr "Etsitn tgitiedostoa %s"
+msgstr "Etsitään tägitiedostoa %s"
-#: ../tag.c:1545
msgid "Ignoring long line in tags file"
-msgstr "Ohitetaan pitk rivi tgitiedostossa"
+msgstr "Ohitetaan pitkä rivi tägitiedostossa"
-#: ../tag.c:1915
#, c-format
msgid "E431: Format error in tags file \"%s\""
-msgstr "E431: Muotovirh tgitiedostossa %s"
+msgstr "E431: Muotovirh tägitiedostossa %s"
-#: ../tag.c:1917
-#, c-format
-msgid "Before byte %<PRId64>"
-msgstr "Ennen tavua %<PRId64>"
+#, fuzzy, c-format
+#~ msgid "Before byte %<PRId64>"
+#~ msgstr "Ennen tavua %ld"
-#: ../tag.c:1929
#, c-format
msgid "E432: Tags file not sorted: %s"
-msgstr "E432: Tgitiedosto ei ole jrjestetty: %s"
+msgstr "E432: Tägitiedosto ei ole järjestetty: %s"
#. never opened any tags file
-#: ../tag.c:1960
msgid "E433: No tags file"
-msgstr "E433: Ei tgitiedostoja"
+msgstr "E433: Ei tägitiedostoja"
-#: ../tag.c:2536
msgid "E434: Can't find tag pattern"
-msgstr "E434: Tgikuviota ei lydy"
+msgstr "E434: Tägikuviota ei löydy"
-#: ../tag.c:2544
msgid "E435: Couldn't find tag, just guessing!"
-msgstr "E435: Tgi ei lydy, arvataan."
+msgstr "E435: Tägiä ei löydy, arvataan."
-#: ../tag.c:2797
#, c-format
msgid "Duplicate field name: %s"
-msgstr "Kaksoiskappale kentn nimest: %s"
-
-#: ../term.c:1442
-msgid "' not known. Available builtin terminals are:"
-msgstr " ei tunnettu. Tuetut terminaalit:"
-
-#: ../term.c:1463
-msgid "defaulting to '"
-msgstr "oletusarvona "
-
-#: ../term.c:1731
-msgid "E557: Cannot open termcap file"
-msgstr "E557: Ei voi avata termcap-tiedostoa"
-
-#: ../term.c:1735
-msgid "E558: Terminal entry not found in terminfo"
-msgstr "E558: Terminaalia ei lytynyt terminfosta"
-
-#: ../term.c:1737
-msgid "E559: Terminal entry not found in termcap"
-msgstr "E559: Terminaalia ei lytynyt termcapista"
-
-#: ../term.c:1878
-#, c-format
-msgid "E436: No \"%s\" entry in termcap"
-msgstr "E436: %s ei lytynyt termcapista"
-
-#: ../term.c:2249
-msgid "E437: terminal capability \"cm\" required"
-msgstr "E437: terminaalilla pit olla cm kyvyissn"
-
-#. Highlight title
-#: ../term.c:4376
-msgid ""
-"\n"
-"--- Terminal keys ---"
-msgstr ""
-"\n"
-"--- Terminaalinppimet ---"
-
-#: ../ui.c:481
-msgid "Vim: Error reading input, exiting...\n"
-msgstr "Vim: Virhe luettaessa sytett, poistutaan...\n"
+msgstr "Kaksoiskappale kentän nimestä: %s"
#. This happens when the FileChangedRO autocommand changes the
#. * file in a way it becomes shorter.
-#: ../undo.c:379
-#, fuzzy
msgid "E881: Line count changed unexpectedly"
-msgstr "E834: Rivimr vaihtui odottamatta"
+msgstr "E881: Rivimäärä vaihtui odottamatta"
-#: ../undo.c:627
#, c-format
msgid "E828: Cannot open undo file for writing: %s"
msgstr "E828: Kumoustiedoston avaus kirjoittamista varten ei onnistu: %s"
-#: ../undo.c:717
+#, fuzzy, c-format
+#~ msgid "E5003: Unable to create directory \"%s\" for undo file: %s"
+#~ msgstr "E346: Hakemisto %s ei ole enää cdpathissa"
+
#, c-format
msgid "E825: Corrupted undo file (%s): %s"
msgstr "E825: Pilaanntunut kumoustiedosto (%s): %s"
-#: ../undo.c:1039
msgid "Cannot write undo file in any directory in 'undodir'"
-msgstr "Ei voitu lukea kumoustiedostoa mistn undodir-muuttujan hakemistosta"
+msgstr "Ei voitu lukea kumoustiedostoa mistään undodir-muuttujan hakemistosta"
-#: ../undo.c:1074
#, c-format
msgid "Will not overwrite with undo file, cannot read: %s"
msgstr "Ei ylikirjoitetat kumoustiedostolla, koska ei voida lukea: %s"
-#: ../undo.c:1092
#, c-format
msgid "Will not overwrite, this is not an undo file: %s"
-msgstr "Ei ylikirjoiteta, koska tm ei ole kumoustiedosto: %s"
+msgstr "Ei ylikirjoiteta, koska tämä ei ole kumoustiedosto: %s"
-#: ../undo.c:1108
msgid "Skipping undo file write, nothing to undo"
msgstr "Ohitetaan kumoustiedoston kirjoitus, koska ei ole peruutettavia"
-#: ../undo.c:1121
#, c-format
msgid "Writing undo file: %s"
msgstr "Kirjoitetaan kumoustiedostoa: %s"
-#: ../undo.c:1213
#, c-format
msgid "E829: write error in undo file: %s"
msgstr "E829: Kirjoitusvirhe kumoustiedostossa: %s"
-#: ../undo.c:1280
#, c-format
msgid "Not reading undo file, owner differs: %s"
msgstr "Ei lueta kumoustiedosto jonka omistaja on eri: %s"
-#: ../undo.c:1292
#, c-format
msgid "Reading undo file: %s"
msgstr "Luetaan kumoustiedostoa: %s"
-#: ../undo.c:1299
#, c-format
msgid "E822: Cannot open undo file for reading: %s"
msgstr "E822: Kumoustiedostoa ei voi avata lukemista varten: %s"
-#: ../undo.c:1308
#, c-format
msgid "E823: Not an undo file: %s"
msgstr "E823: Ei ole kumoustiedosto: %s"
-#: ../undo.c:1313
#, c-format
msgid "E824: Incompatible undo file: %s"
-msgstr "E824: Epyhteensopiva kumoustiedosto: %s"
+msgstr "E824: Epäyhteensopiva kumoustiedosto: %s"
-#: ../undo.c:1328
msgid "File contents changed, cannot use undo info"
msgstr ""
-"Tiedoston sislt on muuttunut, joen kumoustiedot ovat kyttkelvottomia"
+"Tiedoston sisältö on muuttunut, joen kumoustiedot ovat käyttökelvottomia"
-#: ../undo.c:1497
#, c-format
msgid "Finished reading undo file %s"
msgstr "Ladattu kumoustiedoto %s"
-#: ../undo.c:1586 ../undo.c:1812
msgid "Already at oldest change"
msgstr "Vanhimmassa muutoksessa"
-#: ../undo.c:1597 ../undo.c:1814
msgid "Already at newest change"
msgstr "Nuorimmassa muutoksessa"
-#: ../undo.c:1806
-#, c-format
-msgid "E830: Undo number %<PRId64> not found"
-msgstr "E830: Kumouslukua %<PRId64> ei lydy"
+#, fuzzy, c-format
+#~ msgid "E830: Undo number %<PRId64> not found"
+#~ msgstr "E830: Kumouslukua %ld ei löydy"
-#: ../undo.c:1979
msgid "E438: u_undo: line numbers wrong"
-msgstr "E438: u_undo: vrt rivinumerot"
+msgstr "E438: u_undo: väärät rivinumerot"
-#: ../undo.c:2183
msgid "more line"
-msgstr "rivi lis"
+msgstr "rivi lisää"
-#: ../undo.c:2185
msgid "more lines"
-msgstr "rivi lis"
+msgstr "riviä lisää"
-#: ../undo.c:2187
msgid "line less"
-msgstr "rivi vhemmn"
+msgstr "rivi vähemmän"
-#: ../undo.c:2189
msgid "fewer lines"
-msgstr "rivi vhemmn"
+msgstr "riviä vähemmän"
-#: ../undo.c:2193
msgid "change"
msgstr "muutos"
-#: ../undo.c:2195
msgid "changes"
msgstr "muutosta"
-# eka %s ylpuolelta, toka %s alapuolelta, kolmas %s aika
-#: ../undo.c:2225
-#, c-format
-msgid "%<PRId64> %s; %s #%<PRId64> %s"
-msgstr "%<PRId64> %s, %s #%<PRId64> %s"
+# eka %s yläpuolelta, toka %s alapuolelta, kolmas %s aika
+#, fuzzy, c-format
+#~ msgid "%<PRId64> %s; %s #%<PRId64> %s"
+#~ msgstr "%ld %s, %s #%ld %s"
+
+msgid "after"
+msgstr "jälkeen muutoksen"
-#: ../undo.c:2228
msgid "before"
msgstr "ennen muutosta"
-#: ../undo.c:2228
-msgid "after"
-msgstr "jlkeen muutoksen"
-
-#: ../undo.c:2325
msgid "Nothing to undo"
msgstr "Ei kumottavaa"
-#: ../undo.c:2330
-#, fuzzy
msgid "number changes when saved"
-msgstr "muutoksia aika tallennettu"
+msgstr "numero muutoksia aika tallennettu"
-#: ../undo.c:2360
-#, c-format
-msgid "%<PRId64> seconds ago"
-msgstr "%<PRId64> sekuntia sitten"
+#, fuzzy, c-format
+#~ msgid "%<PRId64> seconds ago"
+#~ msgstr "%ld sekuntia sitten"
-#: ../undo.c:2372
msgid "E790: undojoin is not allowed after undo"
-msgstr "E790: undojoin ei toimi undon jlkeen"
+msgstr "E790: undojoin ei toimi undon jälkeen"
-#: ../undo.c:2466
msgid "E439: undo list corrupt"
msgstr "E439: kumouslista rikki"
-#: ../undo.c:2495
msgid "E440: undo line missing"
msgstr "E440: kumousrivi puuttuu"
-#: ../version.c:600
-msgid ""
-"\n"
-"Included patches: "
-msgstr ""
-"\n"
-"Ptsit: "
-
-#: ../version.c:627
msgid ""
"\n"
"Extra patches: "
msgstr ""
"\n"
-"Muita ptsej: "
-
-#: ../version.c:639 ../version.c:864
-msgid "Modified by "
-msgstr "Muokannut "
+"Muita pätsejä: "
-#: ../version.c:646
msgid ""
"\n"
"Compiled "
msgstr ""
"\n"
-"Kntnyt "
+"Kääntänyt "
-#: ../version.c:649
msgid "by "
msgstr ": "
-#: ../version.c:660
+#, fuzzy
msgid ""
"\n"
-"Huge version "
-msgstr ""
"\n"
-"Huge-versio "
-
-#: ../version.c:661
-msgid "without GUI."
-msgstr "ilman GUIta."
-
-#: ../version.c:662
-msgid " Features included (+) or not (-):\n"
+"Optional features included (+) or not (-): "
msgstr " Ominaisuudet mukana (+) ja poissa (-):\n"
-#: ../version.c:667
msgid " system vimrc file: \""
-msgstr " jrjestelmn vimrc: \""
-
-#: ../version.c:672
-msgid " user vimrc file: \""
-msgstr " kyttjn vimrc: \""
-
-#: ../version.c:677
-msgid " 2nd user vimrc file: \""
-msgstr " 2. kyttjn vimrc: \""
+msgstr " järjestelmän vimrc: \""
-#: ../version.c:682
-msgid " 3rd user vimrc file: \""
-msgstr " 3. kyttjn vimrc: \""
-
-#: ../version.c:687
-msgid " user exrc file: \""
-msgstr " kyttjn exrc: \""
-
-#: ../version.c:692
-msgid " 2nd user exrc file: \""
-msgstr " 2. kyttjn exrc: \""
-
-#: ../version.c:699
msgid " fall-back for $VIM: \""
msgstr " $VIMin fallback: \""
-#: ../version.c:705
msgid " f-b for $VIMRUNTIME: \""
msgstr " $VIMRUNTIMEn f-b: \""
-#: ../version.c:709
-msgid "Compilation: "
-msgstr "Knns: "
-
-#: ../version.c:712
-msgid "Linking: "
-msgstr "Linkitys: "
-
-#: ../version.c:717
-msgid " DEBUG BUILD"
-msgstr " DEBUG-versio"
-
-#: ../version.c:767
-msgid "VIM - Vi IMproved"
-msgstr "VIM - Vi IMproved"
-
-#: ../version.c:769
-msgid "version "
-msgstr "versio "
-
-#: ../version.c:770
msgid "by Bram Moolenaar et al."
-msgstr "tekijt Bram Moolenaar et al."
+msgstr "tekijät Bram Moolenaar et al."
-#: ../version.c:774
-msgid "Vim is open source and freely distributable"
-msgstr "Vim on avointa lhdekoodia ja vapaasti jaossa"
+#, fuzzy
+#~ msgid "Nvim is open source and freely distributable"
+#~ msgstr "Vim on avointa lähdekoodia ja vapaasti jaossa"
-#: ../version.c:776
-msgid "Help poor children in Uganda!"
-msgstr "Auta Ugandan kyhi lapsia"
+#~ msgid "https://neovim.io/community"
+#~ msgstr ""
-#: ../version.c:777
-msgid "type :help iccf<Enter> for information "
-msgstr "kirjoita :help iccf<Enter> listietoa varten "
+#, fuzzy
+#~ msgid "type :help nvim<Enter> if you are new! "
+#~ msgstr "kirjoita :help iccf<Enter> lisätietoa varten "
+
+#, fuzzy
+#~ msgid "type :CheckHealth<Enter> to optimize Nvim"
+#~ msgstr "kirjoita :help iccf<Enter> lisätietoa varten "
-#: ../version.c:779
msgid "type :q<Enter> to exit "
msgstr "kirjoita :q<Enter> lopettaaksesi "
-#: ../version.c:780
-msgid "type :help<Enter> or <F1> for on-line help"
-msgstr "kirjoita :help<Enter> tai <F1> ohjetta varten "
-
-#: ../version.c:781
-msgid "type :help version7<Enter> for version info"
-msgstr "kirjoita :help version7<Enter> versiotietoja varten "
-
-#: ../version.c:784
-msgid "Running in Vi compatible mode"
-msgstr "Suoritetaan Vi-yhteensopivuustilaa"
+#, fuzzy
+#~ msgid "type :help<Enter> for help "
+#~ msgstr "kirjoita :q<Enter> lopettaaksesi "
-#: ../version.c:785
-msgid "type :set nocp<Enter> for Vim defaults"
-msgstr "kirjoita :set nocp<Enter> Vimin oletuksiin "
+msgid "Help poor children in Uganda!"
+msgstr "Auta Ugandan köyhiä lapsia"
-#: ../version.c:786
-msgid "type :help cp-default<Enter> for info on this"
-msgstr "kirjoita :help cp-default<Enter> ohjetta oletuksista varten"
+msgid "type :help iccf<Enter> for information "
+msgstr "kirjoita :help iccf<Enter> lisätietoa varten "
-#: ../version.c:827
msgid "Sponsor Vim development!"
-msgstr "Tue Vimin kehityst"
+msgstr "Tue Vimin kehitystä"
-#: ../version.c:828
msgid "Become a registered Vim user!"
-msgstr "Rekisteridy Vim-kyttjksi."
+msgstr "Rekisteröidy Vim-käyttäjäksi."
-#: ../version.c:831
msgid "type :help sponsor<Enter> for information "
-msgstr "kirjoita :help sponsor<Enter> listietoja varten"
+msgstr "kirjoita :help sponsor<Enter> lisätietoja varten"
-#: ../version.c:832
msgid "type :help register<Enter> for information "
-msgstr "kirjoita :help register<Enter> listietoja varten"
+msgstr "kirjoita :help register<Enter> lisätietoja varten"
-#: ../version.c:834
msgid "menu Help->Sponsor/Register for information "
-msgstr "valikko Ohje->Sponsoroi/Rekisteri listietoja varten"
+msgstr "valikko Ohje->Sponsoroi/Rekisteröi lisätietoja varten"
-#: ../window.c:119
msgid "Already only one window"
-msgstr "En yksi ikkuna jljell"
+msgstr "Enää yksi ikkuna jäljellä"
-#: ../window.c:224
msgid "E441: There is no preview window"
msgstr "E441: Ei esikatseluikkunaa"
-#: ../window.c:559
msgid "E442: Can't split topleft and botright at the same time"
-msgstr "E442: Ei voi jakaa vasenta ylnurkkaa ja oikeaa alanurkkaa yhtaikaa"
+msgstr "E442: Ei voi jakaa vasenta ylänurkkaa ja oikeaa alanurkkaa yhtäaikaa"
-#: ../window.c:1228
msgid "E443: Cannot rotate when another window is split"
-msgstr "E443: Ei voi kiert kun toinen ikkuna on jaettu"
+msgstr "E443: Ei voi kiertää kun toinen ikkuna on jaettu"
-#: ../window.c:1803
msgid "E444: Cannot close last window"
-msgstr "E444: Ei voi sulkea viimeist ikkunaa"
+msgstr "E444: Ei voi sulkea viimeistä ikkunaa"
-#: ../window.c:1810
msgid "E813: Cannot close autocmd window"
msgstr "E813: Ei voi sulkea autocmd-ikkunaa"
-#: ../window.c:1814
msgid "E814: Cannot close window, only autocmd window would remain"
-msgstr "E814: Ei voi sulkea viimeist ikkunaa, joka ei ole autocmd-ikkuna"
+msgstr "E814: Ei voi sulkea viimeistä ikkunaa, joka ei ole autocmd-ikkuna"
-#: ../window.c:2717
msgid "E445: Other window contains changes"
-msgstr "E445: Toinen ikkuna sislt muutoksia"
+msgstr "E445: Toinen ikkuna sisältää muutoksia"
-#: ../window.c:4805
msgid "E446: No file name under cursor"
-msgstr "E446: Ei tiedostonime kursorin alla"
+msgstr "E446: Ei tiedostonimeä kursorin alla"
-#~ msgid "E831: bf_key_init() called with empty password"
-#~ msgstr "E831: bf_key_init() tyhjll salasanalla"
+msgid "List or number required"
+msgstr "Lista tai luku tarvitaan"
-#~ msgid "E820: sizeof(uint32_t) != 4"
-#~ msgstr "E820: sizeof(uint32_t) != 4"
+#~ msgid ""
+#~ "Failed to set path: sys.path is not a list\n"
+#~ "You should now append vim.VIM_SPECIAL_PATH to sys.path"
+#~ msgstr ""
+#~ "Ei onnistuttu asettaman polkua: sys.path ei ole list\n"
+#~ "Lisää vim.VIM_SPECIAL_PATH muuttujaan sys.path"
-#~ msgid "E817: Blowfish big/little endian use wrong"
-#~ msgstr "E817: Blowfishin tavujrjestys vr"
+#~ msgid ""
+#~ "Failed to set path hook: sys.path_hooks is not a list\n"
+#~ "You should now do the following:\n"
+#~ "- append vim.path_hook to sys.path_hooks\n"
+#~ "- append vim.VIM_SPECIAL_PATH to sys.path\n"
+#~ msgstr ""
+#~ "Ei voitu asettaa polkukoukkua: sys.path_hooks ei ole lista\n"
+#~ "Koeta seuraavaa:\n"
+#~ "- lisää vim.path_hook muuttujaan sys.path_hooks\n"
+#~ "- lisää vim.VIM_SPECIAL_PATH muuttujaan sys.path\n"
-#~ msgid "E818: sha256 test failed"
-#~ msgstr "E818: sha256-testi eponnistui failed"
+#~ msgid "internal error: invalid value type"
+#~ msgstr "sisäinen virhe: huono arvotyyppi"
-#~ msgid "E819: Blowfish test failed"
-#~ msgstr "E819: Blowfish-testi eponnistui"
+#~ msgid "internal error: NULL reference passed"
+#~ msgstr "sisäinen virhe: NULL-viite annettu"
-#~ msgid "Patch file"
-#~ msgstr "Patch-tiedosto"
+#~ msgid "unable to convert %s to vim structure"
+#~ msgstr "ei voi konvertoida oliota %s vim-tietorakenteeksi"
-#~ msgid ""
-#~ "&OK\n"
-#~ "&Cancel"
-#~ msgstr ""
-#~ "&OK\n"
-#~ "&Peru"
+#~ msgid "unable to convert %s to vim dictionary"
+#~ msgstr "ei voitu konvertoida oliota %s vim-sanakirjaksi"
-#~ msgid "E240: No connection to Vim server"
-#~ msgstr "E240: Ei yhteytt vim-palvelimeen"
+#~ msgid "E859: Failed to convert returned python object to vim value"
+#~ msgstr "E859: Ei voitu konvertoida python-oliota vim-arvoksi"
-#~ msgid "E241: Unable to send to %s"
-#~ msgstr "E241: Kohteeseen %s lhettminen ei onnistunut"
+#~ msgid "E858: Eval did not return a valid python object"
+#~ msgstr "E858: Eval ei palauttanut python-oliota"
-#~ msgid "E277: Unable to read a server reply"
-#~ msgstr "E277: Palvelimen vastauksen lukeminen ei onnistunut"
+#~ msgid "failed to run the code"
+#~ msgstr "ei voitu suorittaa koodia"
-#~ msgid "E258: Unable to send to client"
-#~ msgstr "E258: Asiakkaalle lhetys ei onnistunut"
+#~ msgid "did not switch to the specified tab page"
+#~ msgstr "ei voitu vaihtaa annetulle välilehtisivulle"
-#~ msgid "Save As"
-#~ msgstr "Tallenna nimell"
+#~ msgid "expected vim.TabPage object, but got %s"
+#~ msgstr "odotettiin vim.TabPage-oliota, saatiin %s"
-#~ msgid "Source Vim script"
-#~ msgstr "Lataa vim-skripti"
+#~ msgid "did not switch to the specified window"
+#~ msgstr "ei vaihdettu annettuun ikkunaan"
-#~ msgid "Edit File"
-#~ msgstr "Muokkaa tiedostoa"
+#~ msgid "failed to find window in the current tab page"
+#~ msgstr "ei voitu löytää ikkunaa nykyiselle välilehtisivulle"
-#~ msgid " (NOT FOUND)"
-#~ msgstr " (EI LYTYNYT)"
+#~ msgid "expected vim.Window object, but got %s"
+#~ msgstr "odotettiin vim.Window-oliota, saatiin %s"
-#~ msgid "unknown"
-#~ msgstr "tuntematon"
+#~ msgid "expected vim.Buffer object, but got %s"
+#~ msgstr "odotettiin vim.Buffer-oliota, ei %s"
-#~ msgid "Edit File in new window"
-#~ msgstr "Muokkaa uudessa ikkunassa"
+#~ msgid "attempt to refer to deleted buffer"
+#~ msgstr "yritettiin viitata poistettuun puskuriin"
-#~ msgid "Append File"
-#~ msgstr "Lis tiedostoon"
+#~ msgid "no such window"
+#~ msgstr "ikkunaa ei ole"
-#~ msgid "Window position: X %d, Y %d"
-#~ msgstr "Ikkunan sijainti: X %d, Y %d"
+#~ msgid "readonly attribute: buffer"
+#~ msgstr "kirjoitussuojausattribuutti: puskuri"
-#~ msgid "Save Redirection"
-#~ msgstr "Tallenna uudelleenosoitus"
+#~ msgid "attempt to refer to deleted window"
+#~ msgstr "yritettiin viitata poistettuun ikkunaan"
-#~ msgid "Save View"
-#~ msgstr "Tallenna nkym"
+#~ msgid "no such tab page"
+#~ msgstr "välilehteä ei ole"
-#~ msgid "Save Session"
-#~ msgstr "Tallenna sessio"
+#~ msgid "attempt to refer to deleted tab page"
+#~ msgstr "yritettiin viitata poistettuun välilehteen"
-#~ msgid "Save Setup"
-#~ msgstr "Tallenna asetukset"
+#~ msgid "internal error: unknown option type"
+#~ msgstr "sisäinen virhe: tuntematon asetustyyppi"
-#~ msgid "E809: #< is not available without the +eval feature"
-#~ msgstr "E809: #< ei ole kytss jollei +eval ole pll"
+#~ msgid "unable to get option value"
+#~ msgstr "ei voitu hakea asetuksen arvoa"
-#~ msgid "E196: No digraphs in this version"
-#~ msgstr "E196: Digraafeja ei ole tss versiossa"
+#~ msgid "failed to run function %s"
+#~ msgstr "ei voitu suorittaa funktiota %s"
-#~ msgid "is a device (disabled with 'opendevice' option)"
-#~ msgstr "on laite (ei kytss opendevice-asetuksen takia)"
+#~ msgid "function %s does not exist"
+#~ msgstr "funktiota %s ei ole"
-#~ msgid "Reading from stdin..."
-#~ msgstr "Luetaan vakiosytteest"
+#~ msgid "unnamed function %s does not exist"
+#~ msgstr "nimetöntä funktiota %s ei ole"
-#~ msgid "[crypted]"
-#~ msgstr "[salattu]"
+#~ msgid "cannot modify fixed list"
+#~ msgstr "ei voida muokata kiinitettyä listaa"
-#~ msgid "E821: File is encrypted with unknown method"
-#~ msgstr "E821: Tiedoston salaus on tuntematon"
+#~ msgid "cannot delete vim.List attributes"
+#~ msgstr "ei voi poistaa vim.List-attribuutteja"
-#~ msgid "NetBeans disallows writes of unmodified buffers"
-#~ msgstr "NetBeans ei salli kirjoittaa muokkaamattomiin puskureihin"
+#~ msgid "failed to add item to list"
+#~ msgstr "ei voitu lisätä kohtaa listaan"
-#~ msgid "Partial writes disallowed for NetBeans buffers"
-#~ msgstr "Osittaiset kirjoitukset kielletty NetBeans-puskureissa"
+#~ msgid "attempt to assign sequence of size %d to extended slice of size %d"
+#~ msgstr ""
+#~ "yritettiin asettaa sekvenssiä jonka koko on %d sliceen jonka koko on %d"
-#~ msgid "writing to device disabled with 'opendevice' option"
-#~ msgstr "laitteeseen kirjoittaminen pois kytst opendevice-asetuksella"
+#~ msgid "internal error: failed to add item to list"
+#~ msgstr "sisäinen virhe: ei voitu lisätä kohtaa listaan"
-# tietkseni resurssiforkki on applen tiedostojrjestelmn tunnistejuttujuttu
-#~ msgid "E460: The resource fork would be lost (add ! to override)"
-#~ msgstr "E460: resurssiosa hviisi (lis komentoon ! ohittaaksesi)"
+#~ msgid "internal error: not enough list items"
+#~ msgstr "sisäinen virhe: ei tarpeeksi listan kohtia"
-#~ msgid "<cannot open> "
-#~ msgstr "<ei voi avata> "
-
-#~ msgid "E616: vim_SelFile: can't get font %s"
-#~ msgstr "E616: vim_SelFile: ei saada fonttia %s"
+#~ msgid "internal error: no vim list item %d"
+#~ msgstr "sisäinen virhe: ei vim-listan indeksiä %d"
-#~ msgid "E614: vim_SelFile: can't return to current directory"
-#~ msgstr "E614: vim_SelFile: nykyiseen hakemistoon ei voi palata"
+#~ msgid "attempt to assign sequence of size greater than %d to extended slice"
+#~ msgstr ""
+#~ "yritettiin sijoittaa sekvenssiä jonka koko on enemmän kuin %d sliceen"
-#~ msgid "Pathname:"
-#~ msgstr "Polku:"
+#~ msgid "slice step cannot be zero"
+#~ msgstr "slicen askel ei voi olla nolla"
-#~ msgid "E615: vim_SelFile: can't get current directory"
-#~ msgstr "E615: vim_SelFile: nykyist hakemistoa ei saada selville"
+#~ msgid "internal error: failed to get vim list item %d"
+#~ msgstr "sisäinen virhe: ei pystytty hakea vimin listan indeksiä %d"
-#~ msgid "OK"
-#~ msgstr "OK"
+#~ msgid "list index out of range"
+#~ msgstr "listaindeksi arvoalueen ulkopuolelta"
-#~ msgid "Cancel"
-#~ msgstr "Peru"
+#~ msgid "list constructor does not accept keyword arguments"
+#~ msgstr "listakonstruktori ei tue avainsanaparametrejä"
-#~ msgid "Vim dialog"
-#~ msgstr "Vim-ikkuna"
+#~ msgid "expected sequence element of size 2, but got sequence of size %d"
+#~ msgstr "sekvenssin elementin koon pitäisi olla 2, ei %d"
-#~ msgid "Scrollbar Widget: Could not get geometry of thumb pixmap."
-#~ msgstr "Vierityspalkki: Pixmapin geometria ei selvi"
+#~ msgid "hashtab changed during iteration"
+#~ msgstr "hashtab muuttui kesken iteraation"
-#~ msgid "E232: Cannot create BalloonEval with both message and callback"
-#~ msgstr "E232: Ei voi luoda BalloonEvalia viestille ja callbackille"
+#~ msgid "cannot set attribute %s"
+#~ msgstr "ei voi asettaa attribuuttia %s"
-#~ msgid "E229: Cannot start the GUI"
-#~ msgstr "E229: GUIn kynnistys ei onnistu"
+#~ msgid "cannot delete vim.Dictionary attributes"
+#~ msgstr "ei voi poistaa vim.Dictionary-attribuutteja"
-#~ msgid "E230: Cannot read from \"%s\""
-#~ msgstr "E230: Ei voi lukea kohteesta %s"
+#~ msgid "internal error: imp.find_module returned tuple with NULL"
+#~ msgstr ""
+#~ "sisäinen virhe: imp.find_module palautti tuplen joka sisältää nullin"
-#~ msgid "E665: Cannot start GUI, no valid font found"
-#~ msgstr "E665: Ei voi avata GUIta, sopivaa fonttia ei lydy"
+#~ msgid ""
+#~ "expected 3-tuple as imp.find_module() result, but got tuple of size %d"
+#~ msgstr ""
+#~ "odotettiin 3-tuple tuloksnea imp.find_module()-kutsulle, mutta tuplen "
+#~ "koko onkin %d"
-#~ msgid "E231: 'guifontwide' invalid"
-#~ msgstr "E231: guifontwide virheellinen"
+#~ msgid "expected 3-tuple as imp.find_module() result, but got %s"
+#~ msgstr "odotettiin 3-tuplea tuloksena imp.find_module()-kutsulle, ei %s"
-#~ msgid "E599: Value of 'imactivatekey' is invalid"
-#~ msgstr "E599: imactivatekeyn arvo on virheellinen"
+#~ msgid "E264: Python: Error initialising I/O objects"
+#~ msgstr "E264: Python: Virhe IO-olioiden alustuksessa"
-#~ msgid "E254: Cannot allocate color %s"
-#~ msgstr "E254: Vri %s ei voi mritell"
+#~ msgid "invalid attribute: %s"
+#~ msgstr "virheellinen attribuutti: %s"
-#~ msgid "No match at cursor, finding next"
-#~ msgstr "Ei tsmyst kursorin alla, etsitn seuraava"
+#~ msgid "can't delete OutputObject attributes"
+#~ msgstr "ei voi poistaa OutputObject-attribuutteja"
-#~ msgid "Input _Methods"
-#~ msgstr "Syte_menetelmt"
+#~ msgid "number must be greater or equal to zero"
+#~ msgstr "luvun on oltava yhtä suuri tai suurempi kuin nolla"
-#~ msgid "VIM - Search and Replace..."
-#~ msgstr "VIM - Etsi ja korvaa..."
+#~ msgid "value is too small to fit into C int type"
+#~ msgstr "arvo on liian pieni mahtumaan C:n int-tyyppiin"
-#~ msgid "VIM - Search..."
-#~ msgstr "VIM - Etsi..."
+#~ msgid "expected int() or something supporting coercing to int(), but got %s"
+#~ msgstr ""
+#~ "odotettiin tyyppiä int() tai jotain joka muuntuu tyyppiin int(), ei %s"
-#~ msgid "Find what:"
-#~ msgstr "Etsi:"
+#~ msgid ""
+#~ "expected int(), long() or something supporting coercing to long(), but "
+#~ "got %s"
+#~ msgstr ""
+#~ "odotettiin instanssia tyypeistä int(), long() tai mitä tahansa joka "
+#~ "muuntuisi tyyppiin long(), ei %s"
-#~ msgid "Replace with:"
-#~ msgstr "Korvaa:"
+#~ msgid "expected bytes() or str() instance, but got %s"
+#~ msgstr "odotettiin instanssia tyypeistä bytes() tai str(), ei %s"
-#~ msgid "Match whole word only"
-#~ msgstr "Korvaa kokonaisia sanoja"
+#~ msgid "expected str() or unicode() instance, but got %s"
+#~ msgstr "odottettiin insanssia tyypeistä str() tai unicode(), ei %s"
-#~ msgid "Match case"
-#~ msgstr "Kirjaintaso"
+#~ msgid "index must be int or slice, not %s"
+#~ msgstr "indeksin pitää olla int tai slice, ei %s"
-#~ msgid "Direction"
-#~ msgstr "Suunta"
+#~ msgid "failed to add key '%s' to dictionary"
+#~ msgstr "avaimen %s lisääminen sanakirjaan ei onnistu"
-#~ msgid "Up"
-#~ msgstr "Yls"
+#~ msgid "list is locked"
+#~ msgstr "luettelo on lukittu"
-#~ msgid "Down"
-#~ msgstr "Alas"
+#~ msgid "Need encryption key for \"%s\""
+#~ msgstr "Tarvitaan salausavain kohteelle %s "
-#~ msgid "Find Next"
-#~ msgstr "Etsi seuraava"
+#~ msgid "E744: NetBeans does not allow changes in read-only files"
+#~ msgstr "E744: NetBeans ei tue muutoksia kirjoitussuojattuihin tiedostoihin"
-#~ msgid "Replace"
-#~ msgstr "Korvaa"
+#~ msgid "E463: Region is guarded, cannot modify"
+#~ msgstr "E463: Alue on suojattu, muuttaminen ei onnistu"
-#~ msgid "Replace All"
-#~ msgstr "Korvaa kaikki"
+#~ msgid "E449: Invalid expression received"
+#~ msgstr "E449: Virheellinen ilmaus saatu"
-#~ msgid "Vim: Received \"die\" request from session manager\n"
-#~ msgstr "Vim: sessiomanageri lhetti die-pyynnn\n"
+#~ msgid "E233: cannot open display"
+#~ msgstr "E233: näyttöä ei voi avata"
-#~ msgid "Close"
-#~ msgstr "Sulje"
+#~ msgid "E247: no registered server named \"%s\""
+#~ msgstr "E247: palvelinta %s ei ole rekisteröitynä"
-#~ msgid "New tab"
-#~ msgstr "Uusi vlilehti"
+#~ msgid "E800: Arabic cannot be used: Not enabled at compile time\n"
+#~ msgstr "E800: Arabiaa ei voi käyttää, koska sitä ei käännetty mukaan\n"
-#~ msgid "Open Tab..."
-#~ msgstr "Avaa vlilehti..."
+#~ msgid "E27: Farsi cannot be used: Not enabled at compile time\n"
+#~ msgstr "E27: Farsia ei voi käyttää, koska sitä ei käännetty mukaan\n"
-#~ msgid "Vim: Main window unexpectedly destroyed\n"
-#~ msgstr "Vim: Pikkuna tuhoutui odottamatta\n"
+#~ msgid "E26: Hebrew cannot be used: Not enabled at compile time\n"
+#~ msgstr "E26: Hepreaa ei voi käyttää, koska sitä ei käännetty mukaan\n"
-#~ msgid "&Filter"
-#~ msgstr "&Suodata"
+#~ msgid "E25: GUI cannot be used: Not enabled at compile time"
+#~ msgstr "E25: GUIta ei voi käyttää, koska sitä ei käännetty mukaan"
-#~ msgid "&Cancel"
-#~ msgstr "&Peru"
+#~ msgid "E448: Could not load library function %s"
+#~ msgstr "E448: Ei voitu ladta kirjastofunktiota %s"
-#~ msgid "Directories"
-#~ msgstr "Hakemistot"
+#~ msgid "E236: Font \"%s\" is not fixed-width"
+#~ msgstr "E236: Fontti %s ei ole tasavälinen"
-#~ msgid "Filter"
-#~ msgstr "Suodatus"
+#~ msgid "E234: Unknown fontset: %s"
+#~ msgstr "E234: Tuntematon fontset: %s"
-#~ msgid "&Help"
-#~ msgstr "O&hje"
+#~ msgid "gvimext.dll error"
+#~ msgstr "gvimext.dll-virhe"
-#~ msgid "Files"
-#~ msgstr "Tiedostot"
+#~ msgid "Error creating process: Check if gvim is in your path!"
+#~ msgstr "Virhe prosessin käynnistämisessä, varmista että gvim on polulla"
-#~ msgid "&OK"
-#~ msgstr "&Ok"
+#~ msgid "Edits the selected file(s) with Vim"
+#~ msgstr "Muokkaa valittuja tiedostoja Vimillä"
-#~ msgid "Selection"
-#~ msgstr "Valinta"
+#~ msgid "Edit with existing Vim - "
+#~ msgstr "Muokkaa olemassaolevalla Vimillä - "
-#~ msgid "Find &Next"
-#~ msgstr "Hae &seuraava"
+#~ msgid "Edit with &Vim"
+#~ msgstr "Muokkaa &Vimillä"
-#~ msgid "&Replace"
-#~ msgstr "Ko&rvaa"
+#~ msgid "Diff with Vim"
+#~ msgstr "Diffi Vimillä"
-#~ msgid "Replace &All"
-#~ msgstr "Korvaa k&aikki"
+#~ msgid "Edit with single &Vim"
+#~ msgstr "Muokkaa yhdellä &Vimillä"
-#~ msgid "&Undo"
-#~ msgstr "&Kumoa"
+#~ msgid "Edit with &multiple Vims"
+#~ msgstr "&Muokkaa usealla Vimillä"
-#~ msgid "E671: Cannot find window title \"%s\""
-#~ msgstr "E671: Ikkunan otsikkoa ei lydy %s"
+#~ msgid "E299: Perl evaluation forbidden in sandbox without the Safe module"
+#~ msgstr "E299: Perl-suoritus kielletty hiekkalaatikossa ilman Safe-moduulia"
-# OLE on object linking and embedding p windowska
-#~ msgid "E243: Argument not supported: \"-%s\"; Use the OLE version."
-#~ msgstr "E243: Argumenttia ei tueta: -%s, kyt OLE-versiota"
+#~ msgid ""
+#~ "Sorry, this command is disabled: the Perl library could not be loaded."
+#~ msgstr "komento ei toimi, Perl kirjastoa ei voinut ladata."
-# MDI eli windowsin moni-ikkunasovellus
-#~ msgid "E672: Unable to open window inside MDI application"
-#~ msgstr "E672: Ikkunaa ei voitu avata MDI-sovellukseen"
+#~ msgid "E370: Could not load library %s"
+#~ msgstr "E370: Kirjaston %s lataaminen ei onnistu"
-#~ msgid "Close tab"
-#~ msgstr "Sulje vlilehti"
+#~ msgid "type :help windows95<Enter> for info on this"
+#~ msgstr "kirjoita :help windows95<Enter> lisätietoja varten"
-#~ msgid "Open tab..."
-#~ msgstr "Avaa vlilehti..."
+#~ msgid "WARNING: Windows 95/98/ME detected"
+#~ msgstr "VAROITUS: Window 95/98/ME havaittu"
-#~ msgid "Find string (use '\\\\' to find a '\\')"
-#~ msgstr "Etsi merkkijonoa (\\\\:ll lyt \\:t)"
+#~ msgid " for Vim defaults "
+#~ msgstr " Vim-oletuksia varten"
-#~ msgid "Find & Replace (use '\\\\' to find a '\\')"
-#~ msgstr "Etsi ja korvaa (\\\\:ll lyt \\:t)"
+#~ msgid "menu Edit->Global Settings->Toggle Vi Compatible"
+#~ msgstr "valikko Muokkaa->Yleiset asetukset->Vaihda Vi-yhteensopivuutta"
-#~ msgid "Not Used"
-#~ msgstr "Ei kytss"
+#~ msgid "menu Edit->Global Settings->Toggle Insert Mode "
+#~ msgstr "valikko Muokkaa->Yleiset asetukset->Vaihda syötetilaa"
-#~ msgid "Directory\t*.nothing\n"
-#~ msgstr "Hakemisto\t*.nothing\n"
+#~ msgid "Running modeless, typed text is inserted"
+#~ msgstr "Suoritetaan tilattomana, kirjoitettu teksti syötetään"
-#~ msgid ""
-#~ "Vim E458: Cannot allocate colormap entry, some colors may be incorrect"
-#~ msgstr ""
-#~ "Vim E458: Ei voi varata vrikartan alkiota, vrit voivat menn vrin"
+#~ msgid "menu Help->Orphans for information "
+#~ msgstr "valikko Ohje->Orvot lisätietoja varten "
-#~ msgid "E250: Fonts for the following charsets are missing in fontset %s:"
-#~ msgstr "E250: Seuraavien merkistjoukkojen fontit puuttuvat fontsetist %s:"
+#~ msgid "type :help cp-default<Enter> for info on this"
+#~ msgstr "kirjoita :help cp-default<Enter> ohjetta oletuksista varten"
-#~ msgid "E252: Fontset name: %s"
-#~ msgstr "E252: Fontsetin nimi: %s"
+#~ msgid "type :set nocp<Enter> for Vim defaults"
+#~ msgstr "kirjoita :set nocp<Enter> Vimin oletuksiin "
-#~ msgid "Font '%s' is not fixed-width"
-#~ msgstr "Fontti %s ei ole tasavlinen"
+#~ msgid "Running in Vi compatible mode"
+#~ msgstr "Suoritetaan Vi-yhteensopivuustilaa"
-#~ msgid "E253: Fontset name: %s\n"
-#~ msgstr "E253: Fontsetin nimi: %s\n"
+#~ msgid "type :help version8<Enter> for version info"
+#~ msgstr "kirjoita :help version8<Enter> versiotietoja varten "
-#~ msgid "Font0: %s\n"
-#~ msgstr "Fontti0: %s\n"
+#~ msgid "type :help<Enter> or <F1> for on-line help"
+#~ msgstr "kirjoita :help<Enter> tai <F1> ohjetta varten "
-#~ msgid "Font1: %s\n"
-#~ msgstr "Fontti1: %s\n"
+#~ msgid "version "
+#~ msgstr "versio "
-#~ msgid "Font%<PRId64> width is not twice that of font0\n"
-#~ msgstr "Fontti%<PRId64>:n leveys ei ole kaksi kertaa fontti0:n\n"
+#~ msgid "VIM - Vi IMproved"
+#~ msgstr "VIM - Vi IMproved"
-#~ msgid "Font0 width: %<PRId64>\n"
-#~ msgstr "Fontti0:n leveys: %<PRId64>\n"
+#~ msgid " DEBUG BUILD"
+#~ msgstr " DEBUG-versio"
-#~ msgid ""
-#~ "Font1 width: %<PRId64>\n"
-#~ "\n"
-#~ msgstr ""
-#~ "Fontti1:n leveys: %<PRId64>\n"
-#~ "\n"
+#~ msgid "Linking: "
+#~ msgstr "Linkitys: "
-#~ msgid "Invalid font specification"
-#~ msgstr "Virheellinen fonttimritys"
+#~ msgid "Compiler: "
+#~ msgstr "Käännin: "
-#~ msgid "&Dismiss"
-#~ msgstr "&Ohita"
+#~ msgid "Compilation: "
+#~ msgstr "Käännös: "
-#~ msgid "no specific match"
-#~ msgstr "ei tarkkaa tsmyst"
+#~ msgid " system menu file: \""
+#~ msgstr " järjestelmävalikko: \""
-#~ msgid "Vim - Font Selector"
-#~ msgstr "Vim - fonttivalitsin"
+#~ msgid " defaults file: \""
+#~ msgstr " defaults-tiedosto: \""
-#~ msgid "Name:"
-#~ msgstr "Nimi:"
+#~ msgid "3rd user gvimrc file: \""
+#~ msgstr "3. käyttäjän gvimrc: \""
-#~ msgid "Show size in Points"
-#~ msgstr "Nyt koko pistein"
+#~ msgid "2nd user gvimrc file: \""
+#~ msgstr "2. käyttäjän gvimrc: \""
-#~ msgid "Encoding:"
-#~ msgstr "Koodaus:"
+#~ msgid " user gvimrc file: \""
+#~ msgstr " käyttäjän gvimrc: \""
-#~ msgid "Font:"
-#~ msgstr "Fontti:"
+#~ msgid " system gvimrc file: \""
+#~ msgstr " järjestelmän gvimrc: \""
-#~ msgid "Style:"
-#~ msgstr "Tyyli:"
+#~ msgid " 2nd user exrc file: \""
+#~ msgstr " 2. käyttäjän exrc: \""
-#~ msgid "Size:"
-#~ msgstr "Koko:"
+#~ msgid " user exrc file: \""
+#~ msgstr " käyttäjän exrc: \""
-#~ msgid "E256: Hangul automata ERROR"
-#~ msgstr "E256: Hangu-automaattivirhe"
+#~ msgid " 3rd user vimrc file: \""
+#~ msgstr " 3. käyttäjän vimrc: \""
-#~ msgid "E563: stat error"
-#~ msgstr "E563: stat-virhe"
+#~ msgid " 2nd user vimrc file: \""
+#~ msgstr " 2. käyttäjän vimrc: \""
-#~ msgid "E625: cannot open cscope database: %s"
-#~ msgstr "E625: ei voi avata cscope-tietokantaa: %s"
+#~ msgid " user vimrc file: \""
+#~ msgstr " käyttäjän vimrc: \""
-#~ msgid "E626: cannot get cscope database information"
-#~ msgstr "E626: ei voi hakea cscope-tietokannan tietoja"
+#~ msgid "with (classic) GUI."
+#~ msgstr "perinteisellä GUIlla."
-#~ msgid "Lua library cannot be loaded."
-#~ msgstr "Luan kirjastoa ei voitu ladata."
+#~ msgid "with Cocoa GUI."
+#~ msgstr "Cocoa-GUIlla."
-#~ msgid "cannot save undo information"
-#~ msgstr "ei voitu tallentaa kumoustietoja"
+#~ msgid "with Carbon GUI."
+#~ msgstr "Carbon-GUIlla."
-#~ msgid ""
-#~ "E815: Sorry, this command is disabled, the MzScheme libraries could not "
-#~ "be loaded."
-#~ msgstr "E815: Sori, komento ei toimi, MzScheme-kirjastoa ei voitu ladata."
+#~ msgid "with GUI."
+#~ msgstr "GUIlla."
-#~ msgid "invalid expression"
-#~ msgstr "virheellinen ilmaus"
+#~ msgid "with Photon GUI."
+#~ msgstr "Photon-GUIlla."
-#~ msgid "expressions disabled at compile time"
-#~ msgstr "ilmaukset poistettu kytst knnsaikana"
+#~ msgid "with X11-Athena GUI."
+#~ msgstr "X11-Athena-GUIlla."
-#~ msgid "hidden option"
-#~ msgstr "piilotettu asetus"
+#~ msgid "with X11-neXtaw GUI."
+#~ msgstr "X11-neXtaw-GUIlla."
-#~ msgid "unknown option"
-#~ msgstr "tuntematon asetus"
+#~ msgid "with X11-Motif GUI."
+#~ msgstr "X11-Motif-GUIlla."
-#~ msgid "window index is out of range"
-#~ msgstr "ikkunan indeksi alueen ulkopuolella"
+#~ msgid "with GTK2 GUI."
+#~ msgstr "GTK2-GUIlla."
-#~ msgid "couldn't open buffer"
-#~ msgstr "ei voitu avata puskuria"
+#~ msgid "with GTK2-GNOME GUI."
+#~ msgstr "GTK2-Gnome-GUIlla."
-#~ msgid "cannot delete line"
-#~ msgstr "ei voitu poistaa rivi"
+#~ msgid "with GTK3 GUI."
+#~ msgstr "GTK3-GUIlla."
-#~ msgid "cannot replace line"
-#~ msgstr "ei voitu korvata rivi"
+#~ msgid "without GUI."
+#~ msgstr "ilman GUIta."
-#~ msgid "cannot insert line"
-#~ msgstr "ei voitu list rivi"
+#~ msgid ""
+#~ "\n"
+#~ "Tiny version "
+#~ msgstr ""
+#~ "\n"
+#~ "Tiny-versio "
-#~ msgid "string cannot contain newlines"
-#~ msgstr "merkkijono ei saa sislt rivinvaihtoja"
+#~ msgid ""
+#~ "\n"
+#~ "Small version "
+#~ msgstr ""
+#~ "\n"
+#~ "Small-versio "
-#~ msgid "Vim error: ~a"
-#~ msgstr "Vim-virhe: ~a"
+#~ msgid ""
+#~ "\n"
+#~ "Normal version "
+#~ msgstr ""
+#~ "\n"
+#~ "Normal-versio "
-#~ msgid "Vim error"
-#~ msgstr "Vim-virhe"
+#~ msgid ""
+#~ "\n"
+#~ "Big version "
+#~ msgstr ""
+#~ "\n"
+#~ "Big-version "
-#~ msgid "buffer is invalid"
-#~ msgstr "puskuri on virheellinen"
+#~ msgid ""
+#~ "\n"
+#~ "Huge version "
+#~ msgstr ""
+#~ "\n"
+#~ "Huge-versio "
-#~ msgid "window is invalid"
-#~ msgstr "ikkuna on virheellinen"
+#~ msgid "Modified by "
+#~ msgstr "Muokannut "
-#~ msgid "linenr out of range"
-#~ msgstr "rivinumero arvoalueen ulkopuolelta"
+#~ msgid ""
+#~ "\n"
+#~ "Included patches: "
+#~ msgstr ""
+#~ "\n"
+#~ "Pätsit: "
-#~ msgid "not allowed in the Vim sandbox"
-#~ msgstr "ei sallittu Vimin hiekkalaatikossa"
+#~ msgid ""
+#~ "\n"
+#~ "OpenVMS version"
+#~ msgstr ""
+#~ "\n"
+#~ "OpenVMS-version"
-#~ msgid "E836: This Vim cannot execute :python after using :py3"
+#~ msgid ""
+#~ "\n"
+#~ "MacOS version"
#~ msgstr ""
-#~ "E836: Python: Ei voi kytt komentoja :py ja :py3 samassa istunnossa"
+#~ "\n"
+#~ "MacOS-version"
-#~ msgid "E837: This Vim cannot execute :py3 after using :python"
+#~ msgid ""
+#~ "\n"
+#~ "MacOS X version"
#~ msgstr ""
-#~ "E837: Python: Ei voi kytt komentoja :py ja :py3 samassa istunnossa"
+#~ "\n"
+#~ "MacOS X-version"
#~ msgid ""
-#~ "E263: Sorry, this command is disabled, the Python library could not be "
-#~ "loaded."
+#~ "\n"
+#~ "MacOS X (unix) version"
#~ msgstr ""
-#~ "E263: Sori, komento ei toimi, Python-kirjaston lataaminen ei onnistunut."
+#~ "\n"
+#~ "MacOS X-version (unix)"
-#~ msgid "can't delete OutputObject attributes"
-#~ msgstr "ei voi poistaa OutputObject-attribuutteja"
+#~ msgid ""
+#~ "\n"
+#~ "MS-Windows 32-bit console version"
+#~ msgstr ""
+#~ "\n"
+#~ "MS-Windows 32-bittinen konsoliversio"
-#~ msgid "softspace must be an integer"
-#~ msgstr "softspacen pit olla kokonaisluku"
+#~ msgid ""
+#~ "\n"
+#~ "MS-Windows 64-bit console version"
+#~ msgstr ""
+#~ "\n"
+#~ "MS-Windows 32-bittinen konsoliversio"
-#~ msgid "invalid attribute"
-#~ msgstr "virheellinen attribuutti"
+#~ msgid " with OLE support"
+#~ msgstr " OLE-tuella"
-#~ msgid "<buffer object (deleted) at %p>"
-#~ msgstr "<puskuriolio (poistettu) kohdassa %p>"
+#~ msgid " in Win32s mode"
+#~ msgstr " Win32s-tilassa"
-#~ msgid "E659: Cannot invoke Python recursively"
-#~ msgstr "E659: Pythonia ei voi kutsua rekursiivisesti"
+#~ msgid ""
+#~ "\n"
+#~ "MS-Windows 32-bit GUI version"
+#~ msgstr ""
+#~ "\n"
+#~ "MS-Windows 32-bittinen GUI-version"
-#~ msgid "E265: $_ must be an instance of String"
-#~ msgstr "E265: muuttujan $_ pit olla Stringin instanssi"
+#~ msgid ""
+#~ "\n"
+#~ "MS-Windows 64-bit GUI version"
+#~ msgstr ""
+#~ "\n"
+#~ "MS-Windows 64-bittinen GUI-versio"
#~ msgid ""
-#~ "E266: Sorry, this command is disabled, the Ruby library could not be "
-#~ "loaded."
-#~ msgstr "E266: Sori, komento ei toimi, Ruby-kirjastoa ei voitu ladata."
+#~ "\n"
+#~ "MS-Windows 16/32-bit GUI version"
+#~ msgstr ""
+#~ "\n"
+#~ "MS-Windows 16- t. 32-bittinen GUI-versio"
-#~ msgid "E267: unexpected return"
-#~ msgstr "E267: odotuksenvastainen return"
+#~ msgid "E827: Undo file is encrypted: %s"
+#~ msgstr "E827: Kumoustiedosto on salattu: %s"
-#~ msgid "E268: unexpected next"
-#~ msgstr "E268: Odotuksenvastainen next"
+#~ msgid "E826: Undo file decryption failed: %s"
+#~ msgstr "E826: Kumoustiedoston purku epäonnistui: %s"
-#~ msgid "E269: unexpected break"
-#~ msgstr "E269: Odotuksenvastainen break"
+#~ msgid "E832: Non-encrypted file has encrypted undo file: %s"
+#~ msgstr "E832: Salaamattomalla tiedostolla on salattu kumoustiedosto: %s"
-#~ msgid "E270: unexpected redo"
-#~ msgstr "E270: odotuksenvastainen redo"
+#~ msgid "No undo possible; continue anyway"
+#~ msgstr "Ei voi kumota, jatketaan silti"
-#~ msgid "E271: retry outside of rescue clause"
-#~ msgstr "E271: retry rescuen ulkopuolella"
+#~ msgid "Used CUT_BUFFER0 instead of empty selection"
+#~ msgstr "Käytettiin CUT_BUFFER0:aa tyhjän valinnan sijaan"
-#~ msgid "E272: unhandled exception"
-#~ msgstr "E272: ksittelemtn poikkeus"
+#~ msgid "new shell started\n"
+#~ msgstr "uusi kuori avattu\n"
-#~ msgid "E273: unknown longjmp status %d"
-#~ msgstr "E273: tuntematon longjmp-tila %d"
+#~ msgid "Cannot open $VIMRUNTIME/rgb.txt"
+#~ msgstr "Ei voida avata tiedostoa $VIMRUNTIME/rgb.txt"
-#~ msgid "Toggle implementation/definition"
-#~ msgstr "Vaihda toteutuksen ja mritelmn vlill"
+#~ msgid ""
+#~ "\n"
+#~ "--- Terminal keys ---"
+#~ msgstr ""
+#~ "\n"
+#~ "--- Terminaalinäppäimet ---"
-#~ msgid "Show base class of"
-#~ msgstr "Nyt kantaluokka kohteelle"
+#~ msgid "E437: terminal capability \"cm\" required"
+#~ msgstr "E437: terminaalilla pitää olla cm kyvyissään"
-#~ msgid "Show overridden member function"
-#~ msgstr "Nyt korvattu jsenfunktio"
+#~ msgid "E436: No \"%s\" entry in termcap"
+#~ msgstr "E436: %s ei löytynyt termcapista"
-#~ msgid "Retrieve from file"
-#~ msgstr "Jljit tiedostosta"
+#~ msgid "E559: Terminal entry not found in termcap"
+#~ msgstr "E559: Terminaalia ei löytynyt termcapista"
-#~ msgid "Retrieve from project"
-#~ msgstr "Jljit projektista"
+#~ msgid "E558: Terminal entry not found in terminfo"
+#~ msgstr "E558: Terminaalia ei löytynyt terminfosta"
-#~ msgid "Retrieve from all projects"
-#~ msgstr "Jljit kaikista projekteista"
+#~ msgid "E557: Cannot open termcap file"
+#~ msgstr "E557: Ei voi avata termcap-tiedostoa"
-#~ msgid "Retrieve"
-#~ msgstr "Jljit"
+#~ msgid "defaulting to '"
+#~ msgstr "oletusarvona "
-#~ msgid "Show source of"
-#~ msgstr "Nyt lhdekoodi kohteelle"
+#~ msgid "' not known. Available builtin terminals are:"
+#~ msgstr " ei tunnettu. Tuetut terminaalit:"
-#~ msgid "Find symbol"
-#~ msgstr "Etsi symboli"
+#~ msgid "E430: Tag file path truncated for %s\n"
+#~ msgstr "E430: Tägitiedoston polku katkaistu kohdassa %s\n"
-#~ msgid "Browse class"
-#~ msgstr "Selaa luokkaa"
+#~ msgid "E422: terminal code too long: %s"
+#~ msgstr "E422: terminaalikoodi liian pitkä: %s"
-#~ msgid "Show class in hierarchy"
-#~ msgstr "Nyt luokka hierarkiassa"
+#~ msgid "E845: Insufficient memory, word list will be incomplete"
+#~ msgstr "E845: Muisti ei riitä, sanalista jää keskeneräiseksi"
+
+#~ msgid "Conversion in %s not supported"
+#~ msgstr "Muutosta kohteessa %s ei tueta"
-#~ msgid "Show class in restricted hierarchy"
-#~ msgstr "Nyt luokka rajoitetussa hierarkiassa"
+#~ msgid "Warning: Cannot find word list \"%s_%s.spl\" or \"%s_ascii.spl\""
+#~ msgstr "Varoitus: Ei löydetty sanalistaa %s_%s.spl tai %s_ascii.spl"
-#~ msgid "Xref refers to"
-#~ msgstr "Xref viittaa kohteeseen"
+#~ msgid ""
+#~ "\n"
+#~ "# Last %sSearch Pattern:\n"
+#~ "~"
+#~ msgstr ""
+#~ "\n"
+#~ "# Edellinen %sHakulauseke:\n"
+#~ "~"
-#~ msgid "Xref referred by"
-#~ msgstr "Xref viitattu kohteesta"
+#~ msgid "Substitute "
+#~ msgstr "Korvaa "
-#~ msgid "Xref has a"
-#~ msgstr "Xref sislt kohteen"
+#~ msgid "(NFA) COULD NOT OPEN %s !"
+#~ msgstr "(NFA) EI VOI AVATA KOHDETTA %s"
-#~ msgid "Xref used by"
-#~ msgstr "Xrefi kytt"
+#~ msgid ""
+#~ "Could not open temporary log file for writing, displaying on stderr ... "
+#~ msgstr ""
+#~ "Ei voitu avata väliaikaislokitiedosta kirjoittamista varten, joten "
+#~ "virheet näytetään vakiovirhevirrassa. "
-#~ msgid "Show docu of"
-#~ msgstr "Nyt dokumentti kohteelle"
+#~ msgid "E878: (NFA) Could not allocate memory for branch traversal!"
+#~ msgstr "E878: (NFA) Ei voitu allokoida muistia polkujen läpikäyntiin"
-#~ msgid "Generate docu for"
-#~ msgstr "Luo dokumentti kohteelle"
+#~ msgid "E876: (NFA regexp) Not enough space to store the whole NFA "
+#~ msgstr "E876: (NFA regexp) Tila ei riitä NFA:n tallentamiseen"
#~ msgid ""
-#~ "Cannot connect to SNiFF+. Check environment (sniffemacs must be found in "
-#~ "$PATH).\n"
+#~ "E875: (NFA regexp) (While converting from postfix to NFA), too many "
+#~ "states left on stack"
#~ msgstr ""
-#~ "Ei voida yhdist SNiFF+:aan. Tarkista ympristmuuttujat (sniffemacsin "
-#~ "lyty polkumuuttujasta $PATH).\n"
+#~ "E875: (NFA regexp) (Muunnettaessa postfixistä NFA:ksi), liikaa tiloja "
+#~ "jäljellä pinossa"
-#~ msgid "E274: Sniff: Error during read. Disconnected"
-#~ msgstr "E274: Sniff: Virhe luettaessa, yhteys katkaistu"
+#~ msgid "E874: (NFA) Could not pop the stack !"
+#~ msgstr "E874: (NFA) Ei voida poistaa pinosta"
-#~ msgid "SNiFF+ is currently "
-#~ msgstr "SNiFF+ "
+#~ msgid "E873: (NFA regexp) proper termination error"
+#~ msgstr "E873: (NFA regexp) oikea lopetusvirhe"
-#~ msgid "not "
-#~ msgstr "ei ole "
+#~ msgid "E879: (NFA regexp) Too many \\z("
+#~ msgstr "E879: (NFA regexp) Liikaa merkkejä \\z("
-#~ msgid "connected"
-#~ msgstr "yhdistetty"
+#~ msgid "E872: (NFA regexp) Too many '('"
+#~ msgstr "E872: (NFA regexp) Liian monta suljetta '('"
-#~ msgid "E275: Unknown SNiFF+ request: %s"
-#~ msgstr "E275: Tuntematon SNiFF+-pyynt: %s"
+#~ msgid "E871: (NFA regexp) Can't have a multi follow a multi !"
+#~ msgstr "E871: (NFA regexp) Multi ei voi seurata multia"
-#~ msgid "E276: Error connecting to SNiFF+"
-#~ msgstr "E276: Virhe yhdistettess SNiFF+:aan"
+#~ msgid "E870: (NFA regexp) Error reading repetition limits"
+#~ msgstr "E870: (NFA regexp) Virhe luettaessa toiston määriä"
-#~ msgid "E278: SNiFF+ not connected"
-#~ msgstr "E278: SNiFF+ ei ole yhdistetty"
+#~ msgid "E869: (NFA) Unknown operator '\\@%c'"
+#~ msgstr "E869: (NFA) Tuntematon operaattori '\\@%c'"
-#~ msgid "E279: Not a SNiFF+ buffer"
-#~ msgstr "E279: Ei ole SNiFF+-puskuri"
+#~ msgid "E868: Error building NFA with equivalence class!"
+#~ msgstr "E868: Virhe NFA:n ekvivalenssiluokkia tekemisessä"
-#~ msgid "Sniff: Error during write. Disconnected"
-#~ msgstr "Sniff: Virhe kirjoituksessa, yhteys katkaistu"
+#~ msgid "E867: (NFA) Unknown operator '\\%%%c'"
+#~ msgstr "E867: (NFA) Tuntematon operaattori '\\%%%c'"
-#~ msgid "invalid buffer number"
-#~ msgstr "virheellinen puskurinumero"
+#~ msgid "E867: (NFA) Unknown operator '\\z%c'"
+#~ msgstr "E867: (NFA) Tuntematon operaattori '\\z%c'"
-#~ msgid "not implemented yet"
-#~ msgstr "ei toteutettu"
+#~ msgid "E877: (NFA regexp) Invalid character class: %ld"
+#~ msgstr "E877: (NFA regexp) Virheellinen merkkiluokka: %ld"
-#~ msgid "cannot set line(s)"
-#~ msgstr "ei voi asettaa rivej"
+#~ msgid "E866: (NFA regexp) Misplaced %c"
+#~ msgstr "E866: (NFA-regexp) %c väärässä paikassa"
-#~ msgid "invalid mark name"
-#~ msgstr "virheellinen merkin nimi"
+#~ msgid "E865: (NFA) Regexp end encountered prematurely"
+#~ msgstr "E865: (NFA) Säännöllisen ilmauksen ennenaikainen loppu"
-#~ msgid "mark not set"
-#~ msgstr "merkko ei ole asetettu"
+#~ msgid "Error file"
+#~ msgstr "Virhetiedosto"
-#~ msgid "row %d column %d"
-#~ msgstr "rivi %d sarake %d"
+#~ msgid "shell returned %d"
+#~ msgstr "kuori palautti arvon %d"
-#~ msgid "cannot insert/append line"
-#~ msgstr "rivin lisys ei onnistu"
+#~ msgid "Vim Warning"
+#~ msgstr "Vim-varoitus"
-#~ msgid "line number out of range"
-#~ msgstr "rivinumero arvoalueen ulkopuolella"
+#~ msgid ""
+#~ "VIMRUN.EXE not found in your $PATH.\n"
+#~ "External commands will not pause after completion.\n"
+#~ "See :help win32-vimrun for more information."
+#~ msgstr ""
+#~ "VIMRUN.EXEä ei löydy muuttujasta $PATH.\n"
+#~ "Ulkoiset komennot eivät pysähdy suorituksen lopussa.\n"
+#~ "Lisätietoja komennolla :help win32-vimrun"
-#~ msgid "unknown flag: "
-#~ msgstr "tuntematon asetus: "
+#~ msgid "E371: Command not found"
+#~ msgstr "E371: Komentoa ei löydy"
-#~ msgid "unknown vimOption"
-#~ msgstr "tuntematon vimOption"
+#~ msgid "shutdown"
+#~ msgstr "sammutus"
-#~ msgid "keyboard interrupt"
-#~ msgstr "nppimistkeskeytys"
+#~ msgid "logoff"
+#~ msgstr "uloskirjautuminen"
-#~ msgid "vim error"
-#~ msgstr "vim-virhe"
+#~ msgid "close"
+#~ msgstr "sulkeminen"
-#~ msgid "cannot create buffer/window command: object is being deleted"
-#~ msgstr "ei voi luoda puskuri- tai ikkunakomentoa, olio on poistumassa"
+#~ msgid "Vim: Caught %s event\n"
+#~ msgstr "Vim: Napattiin %s\n"
+
+#~ msgid "Could not fix up function pointers to the DLL!"
+#~ msgstr "Ei voitu korjata funktio-osoittimia DLL:ssä"
+
+#~ msgid "VIM Error"
+#~ msgstr "VIM-virhe"
+
+#~ msgid "Could not load vim32.dll!"
+#~ msgstr "Vim32.dll:ää ei voitu ladata"
+
+#~ msgid "At line"
+#~ msgstr "Rivillä"
+
+#~ msgid "XSMP SmcOpenConnection failed: %s"
+#~ msgstr "XSMP SmcOpenConnection epäonnistui: %s"
+
+#~ msgid "XSMP ICE connection watch failed"
+#~ msgstr "XSMP:n ICE-yhteyden tarkkailu epäonnistui"
+
+#~ msgid "XSMP opening connection"
+#~ msgstr "XSMP avaa yhteyttä"
+
+#~ msgid "XSMP handling save-yourself request"
+#~ msgstr "XSMP käsittelee save-yourself-pyyntöä"
+
+#~ msgid "Opening the X display failed"
+#~ msgstr "X-näytön avaus epäonnistui"
+
+#~ msgid "XSMP lost ICE connection"
+#~ msgstr "XSMP kadotti ICE-yhteyden"
#~ msgid ""
-#~ "cannot register callback command: buffer/window is already being deleted"
-#~ msgstr "callbackia ei voi rekisterid: puskuri tai ikkuna on poistettu"
+#~ "\n"
+#~ "Command terminated\n"
+#~ msgstr ""
+#~ "\n"
+#~ "Komento loppui\n"
#~ msgid ""
-#~ "E280: TCL FATAL ERROR: reflist corrupt!? Please report this to vim-"
-#~ "dev@vim.org"
+#~ "\n"
+#~ "Cannot execute shell "
#~ msgstr ""
-#~ "E280: kriittinen TCL-virhe: reflist hajalla? Ilmoita asiasta "
-#~ "postituslistalle vim-dev@vim.org"
+#~ "\n"
+#~ "Kuoren suoritus ei onnistu "
-#~ msgid "cannot register callback command: buffer/window reference not found"
+#~ msgid ""
+#~ "\n"
+#~ "Cannot fork\n"
#~ msgstr ""
-#~ "callbackia ei voi rekisterid: puskurin tai ikkunan viitett ei lydy"
+#~ "\n"
+#~ "Ei voi haarauttaa\n"
#~ msgid ""
-#~ "E571: Sorry, this command is disabled: the Tcl library could not be "
-#~ "loaded."
-#~ msgstr "E571: Sori, komento ei toimi, Tcl-kirjastoa ei voitu ladata."
+#~ "\n"
+#~ "Cannot create pipes\n"
+#~ msgstr ""
+#~ "\n"
+#~ "Putkia ei voi tehdä\n"
#~ msgid ""
-#~ "E281: TCL ERROR: exit code is not int!? Please report this to vim-dev@vim."
-#~ "org"
+#~ "\n"
+#~ "Cannot execute shell sh\n"
#~ msgstr ""
-#~ "E281: TCL-virhe: lopetuskoodi ei ole kokonaisluku? Ilmoita asiasta "
-#~ "postituslistalle vim-dev@vim.org"
+#~ "\n"
+#~ "Kuoren sh suoritus ei onnistu\n"
-#~ msgid "E572: exit code %d"
-#~ msgstr "E572: palautusarvo %d"
+# mikä security context?
+#~ msgid "Could not get security context %s for %s. Removing it!"
+#~ msgstr "Ei saatu turvallisuuskontekstia %s kohteelle %s ja se poistetaan"
-#~ msgid "cannot get line"
-#~ msgstr "ei voida hakea rivi"
+#~ msgid "Could not set security context %s for %s"
+#~ msgstr "Ei voitu asettaa turvallisuuskontekstia %s kohteelle %s"
-#~ msgid "Unable to register a command server name"
-#~ msgstr "Komentopalvelimen nimen rekisterinti ei onnistu"
+#~ msgid "Opening the X display timed out"
+#~ msgstr "X-näytön avaus aikakatkaistiin"
-#~ msgid "E248: Failed to send command to the destination program"
-#~ msgstr "E248: Komennon lhetys kohdeohjelmalle ei onnistu"
+#~ msgid "Testing the X display failed"
+#~ msgstr "X-näytön testaus epäonnistui"
-#~ msgid "E573: Invalid server id used: %s"
-#~ msgstr "E573: Virheellinen palvelimen tunniste: %s"
+#~ msgid ""
+#~ "\n"
+#~ "Vim: Got X error\n"
+#~ msgstr ""
+#~ "\n"
+#~ "Vim: X-virhe\n"
-#~ msgid "E251: VIM instance registry property is badly formed. Deleted!"
-#~ msgstr "E251: VIMin instanssin rekisteriarvo on virheellinen, poistettiin."
+#~ msgid "Opening the X display took %ld msec"
+#~ msgstr "X-näytön avaus vei %ld millisekuntia"
-#~ msgid "netbeans is not supported with this GUI\n"
-#~ msgstr "netbeans ei toimi tss kyttliittymss\n"
+#~ msgid "E245: Illegal char '%c' in font name \"%s\""
+#~ msgstr "E245: Virheellinen merkki %c fontin nimessä %s"
-#~ msgid "This Vim was not compiled with the diff feature."
-#~ msgstr "Thn Vimiin ei ole knnetty diff-toimintoja mukaan."
+#~ msgid "E244: Illegal quality name \"%s\" in font name \"%s\""
+#~ msgstr "E244: Virheellinen laatunimi %s fontin nimessä %s"
-#~ msgid "'-nb' cannot be used: not enabled at compile time\n"
-#~ msgstr "-nb:t ei voi kytt, koska sit ei knnetty mukaan\n"
+#~ msgid "E244: Illegal charset name \"%s\" in font name \"%s\""
+#~ msgstr "E244: Virheellinen merkistön nimi %s fontin nimessä %s"
-#~ msgid "Vim: Error: Failure to start gvim from NetBeans\n"
-#~ msgstr "Vim: Virhe: Gvimin kynnistys NetBeansist ei onnistu\n"
+#~ msgid "Printing '%s'"
+#~ msgstr "Tulostetaan %s"
+
+#~ msgid "E238: Print error: %s"
+#~ msgstr "E238: Tulostinvirhe: %s"
+
+#~ msgid "E613: Unknown printer font: %s"
+#~ msgstr "E613: Tuntematon tulostimen fontti: %s"
+
+#~ msgid "to %s on %s"
+#~ msgstr "tulostimelle %s kohteessa %s"
+
+#~ msgid "E237: Printer selection failed"
+#~ msgstr "E237: Tulostimen valinta epäonnistui"
+
+#~ msgid "'columns' is not 80, cannot execute external commands"
+#~ msgstr "columns ei ole 80, ei voi suorittaa ulkoista komentoa"
+
+#~ msgid "I/O ERROR"
+#~ msgstr "IO-virhe"
+
+#~ msgid "ANCHOR_BUF_SIZE too small."
+#~ msgstr "ANCHOR_BUF_SIZE liian pieni."
+
+#~ msgid " returned\n"
+#~ msgstr " palautti\n"
+
+#~ msgid "shell "
+#~ msgstr "kuori "
+
+#~ msgid "Cannot execute "
+#~ msgstr "Ei voi suorittaa "
+
+#~ msgid "E360: Cannot execute shell with -f option"
+#~ msgstr "E360: Kuorta ei voi avata asetuksella -f"
+
+#~ msgid "mch_get_shellsize: not a console??\n"
+#~ msgstr "mch_get_shellsize: ei ole konsoli?\n"
+
+#~ msgid "cannot change console mode ?!\n"
+#~ msgstr "ei voi vaihtaa konsolitilaa?\n"
+
+#~ msgid "Vim exiting with %d\n"
+#~ msgstr "Vim sulkeutuu koodilla %d\n"
+
+#~ msgid "Cannot create "
+#~ msgstr "Ei voi luoda "
+
+#~ msgid "Cannot open NIL:\n"
+#~ msgstr "Ei voi avata NILiä:\n"
+
+#~ msgid "Need %s version %ld\n"
+#~ msgstr "Tarvitaan %s versio %ld\n"
+
+#~ msgid "Need Amigados version 2.04 or later\n"
+#~ msgstr "Amigados 2.04 tai uudempi tarvitaan\n"
+
+#~ msgid "VIM: Can't open window!\n"
+#~ msgstr "VIM: Ei voi avata ikkunaa\n"
+
+#~ msgid "cannot open "
+#~ msgstr "ei voi avata "
+
+#~ msgid "E538: No mouse support"
+#~ msgstr "E538: Hiirtä ei tueta"
+
+#~ msgid "E533: can't select wide font"
+#~ msgstr "E533: Leveän fontin valinta ei onnistu"
+
+#~ msgid "E598: Invalid fontset"
+#~ msgstr "E598: Viallinen fontset"
+
+#~ msgid "E597: can't select fontset"
+#~ msgstr "E597: Fontsetin valinta ei onnistu"
+
+#~ msgid "E596: Invalid font(s)"
+#~ msgstr "E596: Viallisia fontteja"
+
+#~ msgid "E617: Cannot be changed in the GTK+ 2 GUI"
+#~ msgstr "E617: Ei voi muuttaa GTK+2-GUIssa"
+
+#~ msgid "E531: Use \":gui\" to start the GUI"
+#~ msgstr "E531: Käytä komentoa :gui GUIn käynnistämiseen"
+
+#~ msgid "E530: Cannot change term in GUI"
+#~ msgstr "E530: Ei voi vaihtaa termiä GUIssa"
+
+#~ msgid "E522: Not found in termcap"
+#~ msgstr "E522: Puuttuu termcapista"
+
+#~ msgid "Thanks for flying Vim"
+#~ msgstr "Kiitos että ajoit Vimiä"
+
+#~ msgid "%<%f%h%m%=Page %N"
+#~ msgstr "%<%f%h%m%=Sivu %N"
#~ msgid ""
#~ "\n"
-#~ "Where case is ignored prepend / to make flag upper case"
+#~ "# Registers:\n"
#~ msgstr ""
#~ "\n"
-#~ "Jos aakkoslaji on ohitettu, lis alkuun / tehdksesi asetuksesta "
-#~ "suuraakkosia"
+#~ "# Rekisterit:\n"
-#~ msgid "-register\t\tRegister this gvim for OLE"
-#~ msgstr "-register\t\trekisteri gvim OLEa varten"
+#~ msgid "Illegal register name"
+#~ msgstr "Virheellinen rekisterin nimi"
-#~ msgid "-unregister\t\tUnregister gvim for OLE"
-#~ msgstr "-unregister\t\tPoista gvim OLE-rekisterist"
+#~ msgid "freeing %ld lines"
+#~ msgstr "vapautetaan %ld riviä"
-#~ msgid "-g\t\t\tRun using GUI (like \"gvim\")"
-#~ msgstr "-g\t\t\tAvaa GUI (kuten gvimill)"
+#~ msgid "cannot yank; delete anyway"
+#~ msgstr "Ei voi kopioida; poista joka tapauksessa"
-#~ msgid "-f or --nofork\tForeground: Don't fork when starting GUI"
-#~ msgstr "-f tai --nofork\tEdustalle: l haarauta GUIn kynnistyksess"
+#~ msgid "E775: Eval feature not available"
+#~ msgstr "E775: Eval ei ole käytettävissä"
-#~ msgid "-f\t\t\tDon't use newcli to open window"
-#~ msgstr "-f\t\t\tl kyt newcli:t ikkunan avaamiseen"
+#~ msgid "E505: %s is read-only (add ! to override)"
+#~ msgstr "E505: %s on kirjoitussuojattu (lisää komentoon ! ohittaaksesi)"
-#~ msgid "-dev <device>\t\tUse <device> for I/O"
-#~ msgstr "-dev <laite>\t\tKyt <laitetta> IO:hon"
+#~ msgid "E511: netbeans already connected"
+#~ msgstr "E511: netbeans on yhdistetty jo"
-#~ msgid "-U <gvimrc>\t\tUse <gvimrc> instead of any .gvimrc"
-#~ msgstr "-U <gvimrc>\t\tKyt <gvimrc>-tiedostoa .gvimrc:iden sijasta"
+#~ msgid "E838: netbeans is not supported with this GUI"
+#~ msgstr "E838: netbeans ei toimi tässä käyttöliittymässä"
-#~ msgid "-x\t\t\tEdit encrypted files"
-#~ msgstr "-x\t\t\tMuokkaa salattua tiedostoa"
+#~ msgid "E658: NetBeans connection lost for buffer %ld"
+#~ msgstr "E658: NetBeans-yhteys katkesi puskurille %ld"
-#~ msgid "-display <display>\tConnect vim to this particular X-server"
-#~ msgstr "-display <nytt>\tYhdist vim tiettyyn X-palvelimeen"
+#~ msgid "E668: Wrong access mode for NetBeans connection info file: \"%s\""
+#~ msgstr "E668: Väärä avaustila NetBeans-yhteyden infotiedostolle: %s"
-#~ msgid "-X\t\t\tDo not connect to X server"
-#~ msgstr "-X\t\t\tl yhdist X-palvelimeen"
+#~ msgid "E547: Illegal mouseshape"
+#~ msgstr "E547: Virheellinen hiiren muoto"
-#~ msgid "--remote <files>\tEdit <files> in a Vim server if possible"
-#~ msgstr ""
-#~ "--remote <tiedostoja>\tMuokkaa <tiedostoja> Vim-palvelimessa, jos "
-#~ "mahdollista"
+#~ msgid "E341: Internal error: lalloc(%ld, )"
+#~ msgstr "E341: Sisäinen virhe: lalloc(%ld, )"
-#~ msgid "--remote-silent <files> Same, don't complain if there is no server"
-#~ msgstr ""
-#~ "--remote-silent <tiedostoja>\tSama, mutta l ilmoita puuttuvasta "
-#~ "palvelimesta"
+#~ msgid "E340: Line is becoming too long"
+#~ msgstr "E340: Rivistä tulee liian pitkä"
#~ msgid ""
-#~ "--remote-wait <files> As --remote but wait for files to have been edited"
+#~ "[calls] total re/malloc()'s %lu, total free()'s %lu\n"
+#~ "\n"
#~ msgstr ""
-#~ "--remote-wait <tiedostoja> kuten --remote, mutta odota tiedostojen "
-#~ "muokkaamista"
+#~ "[kutsut] yht. re/malloc() %lu, yht. free() %lu\n"
+#~ "\n"
#~ msgid ""
-#~ "--remote-wait-silent <files> Same, don't complain if there is no server"
+#~ "\n"
+#~ "[bytes] total alloc-freed %lu-%lu, in use %lu, peak use %lu\n"
#~ msgstr ""
-#~ "--remote-wait-silent <tiedostoja> sama, mutta l ilmoita puuttuvasta "
-#~ "palvelimesta"
+#~ "\n"
+#~ "[tavua] yht. alloc-free %lu-%lu, käytössä %lu, käyttöhuippu %lu\n"
-#~ msgid ""
-#~ "--remote-tab[-wait][-silent] <files> As --remote but use tab page per "
-#~ "file"
-#~ msgstr ""
-#~ "--remote-tab[-wait][-silent] <tiedostoja> kuten --remote, mutta avaa "
-#~ "vlilehti joka tiedostolle"
+#~ msgid "ERROR: "
+#~ msgstr "VIRHE: "
-#~ msgid "--remote-send <keys>\tSend <keys> to a Vim server and exit"
-#~ msgstr ""
-#~ "--remote-send <nppimi>\tLhet <nppimi> painalluksina Vimille ja "
-#~ "lopeta"
+#~ msgid "E338: Sorry, no file browser in console mode"
+#~ msgstr "E338: tiedostonselain puuttuu konsolitilasta"
-#~ msgid ""
-#~ "--remote-expr <expr>\tEvaluate <expr> in a Vim server and print result"
-#~ msgstr ""
-#~ "--remote-expr <ilmaus>\tKsittele <ilmaus> Vim-palvelimella ja tulosta "
-#~ "tulos"
+#~ msgid "Open File dialog"
+#~ msgstr "Avausikkuna"
-#~ msgid "--serverlist\t\tList available Vim server names and exit"
-#~ msgstr "--serverlist\t\tLuettele Vim-palvelinten nimet ja lopeta"
+#~ msgid "Save File dialog"
+#~ msgstr "Tallennusikkuna"
-#~ msgid "--servername <name>\tSend to/become the Vim server <name>"
-#~ msgstr "--servername <nimi>\tLhet Vim-palvelimelle <nimi> tai luo se"
+#~ msgid "Select Directory dialog"
+#~ msgstr "Hakemiston valintaikkuna"
+
+#~ msgid "Messages maintainer: Bram Moolenaar <Bram@vim.org>"
+#~ msgstr "Käännöksen ylläpitäjä: Flammie Pirinen <flammie@iki.fi>"
+
+#~ msgid "E337: Menu not found - check menu names"
+#~ msgstr "E337: Valikkoa ei löytynyt - tarkista valikkojen nimet"
+
+#~ msgid "E336: Menu path must lead to a sub-menu"
+#~ msgstr "E336: Valikkopolun pitää johtaa alivalikkoon"
+
+#~ msgid "Tear off this menu"
+#~ msgstr "Repäise valikko irti"
+
+#~ msgid "Swap file already exists!"
+#~ msgstr "Swap-tiedosto on jo olemassa"
#~ msgid ""
#~ "\n"
-#~ "Arguments recognised by gvim (Motif version):\n"
+#~ " [not usable with this version of Vim]"
#~ msgstr ""
#~ "\n"
-#~ "Gvimin (Motif-version) tuntemat argumentit:\n"
+#~ " [ei toimi tämän Vim-version kanssa]"
+
+#~ msgid "Using crypt key from swap file for the text file.\n"
+#~ msgstr "Käytetään swäpin salausavainta tekstitiedostolle\n"
#~ msgid ""
#~ "\n"
-#~ "Arguments recognised by gvim (neXtaw version):\n"
+#~ "to use the same key for text file and swap file"
#~ msgstr ""
#~ "\n"
-#~ "Gvimin (neXtaw-version) tuntemat argumentit:\n"
+#~ "käyttääksesi samaa avainta teksti- ja swäppitiedostoille"
#~ msgid ""
#~ "\n"
-#~ "Arguments recognised by gvim (Athena version):\n"
+#~ "If you wrote the text file after changing the crypt key press enter"
#~ msgstr ""
#~ "\n"
-#~ "Gvimin (Athena-version) tuntemat argumentit:\n"
+#~ "Jos kirjoitit tekstitiedoston salausavaimen vaihdon jälkeen paina enteriä"
-#~ msgid "-display <display>\tRun vim on <display>"
-#~ msgstr "-display <nytt>\tSuorita vim <nytss>"
+#~ msgid ""
+#~ "\n"
+#~ "enter the new crypt key."
+#~ msgstr ""
+#~ "\n"
+#~ "anna uusi salausavain."
-#~ msgid "-iconic\t\tStart vim iconified"
-#~ msgstr "-iconic\t\tKynnist pienennettyn"
+#~ msgid ""
+#~ "\n"
+#~ "If you entered a new crypt key but did not write the text file,"
+#~ msgstr ""
+#~ "\n"
+#~ "Jos käytit uutta salausavainta muttet kirjoittanut tekstitiedostoa,"
-#~ msgid "-background <color>\tUse <color> for the background (also: -bg)"
-#~ msgstr "-background <vri>\tKyt <vri> taustavrin (mys: -bg)"
+#~ msgid "Swap file is encrypted: \"%s\""
+#~ msgstr "Swap-tiedosto on salattu: %s"
-#~ msgid "-foreground <color>\tUse <color> for normal text (also: -fg)"
-#~ msgstr "-foreground <vri>\tKyt <vri> tekstin vrin (mys: -fg)"
+#~ msgid ""
+#~ "E833: %s is encrypted and this version of Vim does not support encryption"
+#~ msgstr "E833: %s on salattu eikä tämä Vim tue salausta"
-#~ msgid "-font <font>\t\tUse <font> for normal text (also: -fn)"
-#~ msgstr "-font <fontti>\t\tKyt <fonttia> tekstiss (mys: -fn)"
+#~ msgid "E843: Error while updating swap file crypt"
+#~ msgstr "E843: Virhe päivitettäessä swapin kryptausta"
-#~ msgid "-boldfont <font>\tUse <font> for bold text"
-#~ msgstr "-boldfont <fontti>\tKyt <fonttia> lihavoidussa tekstiss"
+#~ msgid "E289: input method doesn't support my preedit type"
+#~ msgstr "E289: syötemetodi ei tue tätä preedit-tyyppiä"
-#~ msgid "-italicfont <font>\tUse <font> for italic text"
-#~ msgstr "-italicfont <fontti>\tKyt <fonttia> kursivoidussa tekstiss"
+#~ msgid "E288: input method doesn't support any style"
+#~ msgstr "E288: syötemetodi ei tue tyylejä"
-#~ msgid "-geometry <geom>\tUse <geom> for initial geometry (also: -geom)"
+#~ msgid "E287: Warning: Could not set destroy callback to IM"
#~ msgstr ""
-#~ "-geometry <geom>\tKyt mittoja <geom> ikkunan asetteluun (mys: -geom)"
+#~ "E287: Varoitus: Ei voitu asettaa destroy-kutsua syötemetodipalvelimelle"
-#~ msgid "-borderwidth <width>\tUse a border width of <width> (also: -bw)"
-#~ msgstr "-borderwidt <leveys>\tKyt <leveytt> reunuksissa (mys: -bw) "
-
-#~ msgid ""
-#~ "-scrollbarwidth <width> Use a scrollbar width of <width> (also: -sw)"
-#~ msgstr ""
-#~ "-scrollbarwidth <leveys> Kyt <leveytt> vierityspalkissa (mys: -sw)"
+#~ msgid "E286: Failed to open input method"
+#~ msgstr "E286: Syötemetodin avaus ei onnistu"
-#~ msgid "-menuheight <height>\tUse a menu bar height of <height> (also: -mh)"
-#~ msgstr "-menuheight <korkeus>\tKyt <korkeutta> valikossa (mys: -mh)"
+#~ msgid "E285: Failed to create input context"
+#~ msgstr "E285: Syötekontekstin luonti ei onnistu"
-#~ msgid "-reverse\t\tUse reverse video (also: -rv)"
-#~ msgstr "-reverse\t\tKyt knteisvrej (mys: -rv) "
+#~ msgid "E284: Cannot set IC values"
+#~ msgstr "E284: Ei voi asettaa IC-arvoja"
-#~ msgid "+reverse\t\tDon't use reverse video (also: +rv)"
-#~ msgstr "+reverse\t\tl kyt knteisvrej (mys: +rv)"
+#~ msgid "E543: Not a valid codepage"
+#~ msgstr "E543: Koodisivu ei ole käypä"
-#~ msgid "-xrm <resource>\tSet the specified resource"
-#~ msgstr "-xrm <resurssi>\tAseta resurssi"
+#~ msgid "Missing '>'"
+#~ msgstr "> puuttuu"
#~ msgid ""
#~ "\n"
-#~ "Arguments recognised by gvim (RISC OS version):\n"
+#~ "# History of marks within files (newest to oldest):\n"
#~ msgstr ""
#~ "\n"
-#~ "Gvimin (RISC OS -version) tuntemat argumentit:\n"
-
-#~ msgid "--columns <number>\tInitial width of window in columns"
-#~ msgstr "--columns <luku>\tIkkunan alkuleveys sarakkeina"
+#~ "# Tiedostojen merkkien historia (uusimmasta vanhimpaan):\n"
-#~ msgid "--rows <number>\tInitial height of window in rows"
-#~ msgstr "--rows <luku>\tIkkunan alkukorkeus rivein"
+#~ msgid ""
+#~ "\n"
+#~ "# Jumplist (newest first):\n"
+#~ msgstr ""
+#~ "\n"
+#~ "# Hyppylista (uusin ensiksi):\n"
#~ msgid ""
#~ "\n"
-#~ "Arguments recognised by gvim (GTK+ version):\n"
+#~ "# File marks:\n"
#~ msgstr ""
#~ "\n"
-#~ "Gvimin (GTK+-version) tuntemat argumentit:\n"
+#~ "# Tiedoston merkit:\n"
-#~ msgid "-display <display>\tRun vim on <display> (also: --display)"
-#~ msgstr "-display <nytt>\tSuorita vim nytll <nytt> (mys: --display)"
+#~ msgid ": Send expression failed.\n"
+#~ msgstr ": Ilmauksen lähetys epäonnistui.\n"
-# X-ikkunointijrjestelmss saman sovelluksen saman luokan ikkunat
-# tunnistetaan rooliresursseista
-#~ msgid "--role <role>\tSet a unique role to identify the main window"
-#~ msgstr ""
-#~ "--role <rooli>\tAseta pikkunalle ainutlaatuinen rooli tunnisteeksi"
+#~ msgid "No display: Send expression failed.\n"
+#~ msgstr "Ei näyttöä: Ilmauksen lähetys epäonnistui.\n"
-#~ msgid "--socketid <xid>\tOpen Vim inside another GTK widget"
-#~ msgstr "--socketid <xid>\tAvaa Vim annettuun GTK-olioon "
+#~ msgid "%d of %d edited"
+#~ msgstr "%d/%d muokattu"
-#~ msgid "-P <parent title>\tOpen Vim inside parent application"
-#~ msgstr "-P <otsikko>\tAvaa Vim isntohjelman sisn"
+#~ msgid ": Send failed. Trying to execute locally\n"
+#~ msgstr ": Lähetys epäonnistui. Yritetään suorittaa paikallisena\n"
+
+#~ msgid ": Send failed.\n"
+#~ msgstr ": Lähetys epäonnistui.\n"
+
+#~ msgid "No display"
+#~ msgstr "Ei näyttöä"
#~ msgid "--windowid <HWND>\tOpen Vim inside another win32 widget"
#~ msgstr "--windowid <HWND>\tAvaa Vim annettuun win32-olioon "
-#~ msgid "No display"
-#~ msgstr "Ei nytt"
+#~ msgid "-P <parent title>\tOpen Vim inside parent application"
+#~ msgstr "-P <otsikko>\tAvaa Vim isäntäohjelman sisään"
-#~ msgid ": Send failed.\n"
-#~ msgstr ": Lhetys eponnistui.\n"
+#~ msgid "--echo-wid\t\tMake gvim echo the Window ID on stdout"
+#~ msgstr "--echo-wid\t\tTulosta gvimin Window ID vakiotulosteeseen"
-#~ msgid ": Send failed. Trying to execute locally\n"
-#~ msgstr ": Lhetys eponnistui. Yritetn suorittaa paikallisena\n"
+#~ msgid "--socketid <xid>\tOpen Vim inside another GTK widget"
+#~ msgstr "--socketid <xid>\tAvaa Vim annettuun GTK-olioon "
-#~ msgid "%d of %d edited"
-#~ msgstr "%d/%d muokattu"
+# X-ikkunointijärjestelmässä saman sovelluksen saman luokan ikkunat
+# tunnistetaan rooliresursseista
+#~ msgid "--role <role>\tSet a unique role to identify the main window"
+#~ msgstr ""
+#~ "--role <rooli>\tAseta pääikkunalle ainutlaatuinen rooli tunnisteeksi"
-#~ msgid "No display: Send expression failed.\n"
-#~ msgstr "Ei nytt: Ilmauksen lhetys eponnistui.\n"
+#~ msgid "-display <display>\tRun vim on <display> (also: --display)"
+#~ msgstr "-display <näyttö>\tSuorita vim näytöllä <näyttö> (myös: --display)"
-#~ msgid ": Send expression failed.\n"
-#~ msgstr ": Ilmauksen lhetys eponnistui.\n"
+#~ msgid ""
+#~ "\n"
+#~ "Arguments recognised by gvim (GTK+ version):\n"
+#~ msgstr ""
+#~ "\n"
+#~ "Gvimin (GTK+-version) tuntemat argumentit:\n"
-#~ msgid "E543: Not a valid codepage"
-#~ msgstr "E543: Koodisivu ei ole kyp"
+#~ msgid "-xrm <resource>\tSet the specified resource"
+#~ msgstr "-xrm <resurssi>\tAseta resurssi"
-#~ msgid "E285: Failed to create input context"
-#~ msgstr "E285: Sytekontekstin luonti ei onnistu"
+#~ msgid "+reverse\t\tDon't use reverse video (also: +rv)"
+#~ msgstr "+reverse\t\tÄlä käytä käänteisvärejä (myös: +rv)"
-#~ msgid "E286: Failed to open input method"
-#~ msgstr "E286: Sytemetodin avaus ei onnistu"
+#~ msgid "-reverse\t\tUse reverse video (also: -rv)"
+#~ msgstr "-reverse\t\tKäytä käänteisvärejä (myös: -rv) "
-#~ msgid "E287: Warning: Could not set destroy callback to IM"
+#~ msgid "-menuheight <height>\tUse a menu bar height of <height> (also: -mh)"
+#~ msgstr "-menuheight <korkeus>\tKäytä <korkeutta> valikossa (myös: -mh)"
+
+#~ msgid ""
+#~ "-scrollbarwidth <width> Use a scrollbar width of <width> (also: -sw)"
#~ msgstr ""
-#~ "E287: Varoitus: Ei voitu asettaa destroy-kutsua sytemetodipalvelimelle"
+#~ "-scrollbarwidth <leveys> Käytä <leveyttä> vierityspalkissa (myös: -sw)"
-#~ msgid "E288: input method doesn't support any style"
-#~ msgstr "E288: sytemetodi ei tue tyylej"
+#~ msgid "-borderwidth <width>\tUse a border width of <width> (also: -bw)"
+#~ msgstr "-borderwidt <leveys>\tKäytä <leveyttä> reunuksissa (myös: -bw) "
-#~ msgid "E289: input method doesn't support my preedit type"
-#~ msgstr "E289: sytemetodi ei tue tt preedit-tyyppi"
+#~ msgid "-geometry <geom>\tUse <geom> for initial geometry (also: -geom)"
+#~ msgstr ""
+#~ "-geometry <geom>\tKäytä mittoja <geom> ikkunan asetteluun (myös: -geom)"
-#~ msgid ""
-#~ "E833: %s is encrypted and this version of Vim does not support encryption"
-#~ msgstr "E833: %s on salattu eik tm Vim tue salausta"
+#~ msgid "-italicfont <font>\tUse <font> for italic text"
+#~ msgstr "-italicfont <fontti>\tKäytä <fonttia> kursivoidussa tekstissä"
-#~ msgid "Swap file is encrypted: \"%s\""
-#~ msgstr "Swap-tiedosto on salattu: %s"
+#~ msgid "-boldfont <font>\tUse <font> for bold text"
+#~ msgstr "-boldfont <fontti>\tKäytä <fonttia> lihavoidussa tekstissä"
+
+#~ msgid "-font <font>\t\tUse <font> for normal text (also: -fn)"
+#~ msgstr "-font <fontti>\t\tKäytä <fonttia> tekstissä (myös: -fn)"
+
+#~ msgid "-foreground <color>\tUse <color> for normal text (also: -fg)"
+#~ msgstr "-foreground <väri>\tKäytä <väriä> tekstin värinä (myös: -fg)"
+
+#~ msgid "-background <color>\tUse <color> for the background (also: -bg)"
+#~ msgstr "-background <väri>\tKäytä <väriä> taustavärinä (myös: -bg)"
+
+#~ msgid "-iconic\t\tStart vim iconified"
+#~ msgstr "-iconic\t\tKäynnistä pienennettynä"
+
+#~ msgid "-display <display>\tRun vim on <display>"
+#~ msgstr "-display <näyttö>\tSuorita vim <näytössä>"
#~ msgid ""
#~ "\n"
-#~ "If you entered a new crypt key but did not write the text file,"
+#~ "Arguments recognised by gvim (Athena version):\n"
#~ msgstr ""
#~ "\n"
-#~ "Jos kytit uutta salausavainta muttet kirjoittanut tekstitiedostoa,"
+#~ "Gvimin (Athena-version) tuntemat argumentit:\n"
#~ msgid ""
#~ "\n"
-#~ "enter the new crypt key."
+#~ "Arguments recognised by gvim (neXtaw version):\n"
#~ msgstr ""
#~ "\n"
-#~ "anna uusi salausavain."
+#~ "Gvimin (neXtaw-version) tuntemat argumentit:\n"
#~ msgid ""
#~ "\n"
-#~ "If you wrote the text file after changing the crypt key press enter"
+#~ "Arguments recognised by gvim (Motif version):\n"
#~ msgstr ""
#~ "\n"
-#~ "Jos kirjoitit tekstitiedoston salausavaimen vaihdon jlkeen paina enteri"
+#~ "Gvimin (Motif-version) tuntemat argumentit:\n"
+
+#~ msgid "-i <viminfo>\t\tUse <viminfo> instead of .viminfo"
+#~ msgstr "-i <viminfo>\t\tKäytä <viminfo>-tiedostoa .viminfon sijaan"
+
+#~ msgid "--servername <name>\tSend to/become the Vim server <name>"
+#~ msgstr "--servername <nimi>\tLähetä Vim-palvelimelle <nimi> tai luo se"
+
+#~ msgid "--serverlist\t\tList available Vim server names and exit"
+#~ msgstr "--serverlist\t\tLuettele Vim-palvelinten nimet ja lopeta"
#~ msgid ""
-#~ "\n"
-#~ "to use the same key for text file and swap file"
+#~ "--remote-expr <expr>\tEvaluate <expr> in a Vim server and print result"
#~ msgstr ""
-#~ "\n"
-#~ "kyttksesi samaa avainta teksti- ja swppitiedostoille"
+#~ "--remote-expr <ilmaus>\tKäsittele <ilmaus> Vim-palvelimella ja tulosta "
+#~ "tulos"
-#~ msgid "Using crypt key from swap file for the text file.\n"
-#~ msgstr "Kytetn swpin salausavainta tekstitiedostolle\n"
+#~ msgid "--remote-send <keys>\tSend <keys> to a Vim server and exit"
+#~ msgstr ""
+#~ "--remote-send <näppäimiä>\tLähetä <näppäimiä> painalluksina Vimille ja "
+#~ "lopeta"
#~ msgid ""
-#~ "\n"
-#~ " [not usable with this version of Vim]"
+#~ "--remote-tab[-wait][-silent] <files> As --remote but use tab page per "
+#~ "file"
#~ msgstr ""
-#~ "\n"
-#~ " [ei toimi tmn Vim-version kanssa]"
+#~ "--remote-tab[-wait][-silent] <tiedostoja> kuten --remote, mutta avaa "
+#~ "välilehti joka tiedostolle"
-#~ msgid "Tear off this menu"
-#~ msgstr "Repise valikko irti"
+#~ msgid ""
+#~ "--remote-wait-silent <files> Same, don't complain if there is no server"
+#~ msgstr ""
+#~ "--remote-wait-silent <tiedostoja> sama, mutta älä ilmoita puuttuvasta "
+#~ "palvelimesta"
-#~ msgid "Select Directory dialog"
-#~ msgstr "Hakemiston valintaikkuna"
+#~ msgid ""
+#~ "--remote-wait <files> As --remote but wait for files to have been edited"
+#~ msgstr ""
+#~ "--remote-wait <tiedostoja> kuten --remote, mutta odota tiedostojen "
+#~ "muokkaamista"
-#~ msgid "Save File dialog"
-#~ msgstr "Tallennusikkuna"
+#~ msgid "--remote-silent <files> Same, don't complain if there is no server"
+#~ msgstr ""
+#~ "--remote-silent <tiedostoja>\tSama, mutta älä ilmoita puuttuvasta "
+#~ "palvelimesta"
-#~ msgid "Open File dialog"
-#~ msgstr "Avausikkuna"
+#~ msgid "--remote <files>\tEdit <files> in a Vim server if possible"
+#~ msgstr ""
+#~ "--remote <tiedostoja>\tMuokkaa <tiedostoja> Vim-palvelimessa, jos "
+#~ "mahdollista"
-#~ msgid "E338: Sorry, no file browser in console mode"
-#~ msgstr "E338: Sori, tiedostonselain puuttuu konsolitilasta"
+#~ msgid "-X\t\t\tDo not connect to X server"
+#~ msgstr "-X\t\t\tÄlä yhdistä X-palvelimeen"
-#~ msgid "Vim: preserving files...\n"
-#~ msgstr "Vim: sstetn tiedostoja...\n"
+#~ msgid "-display <display>\tConnect vim to this particular X-server"
+#~ msgstr "-display <näyttö>\tYhdistä vim tiettyyn X-palvelimeen"
-#~ msgid "Vim: Finished.\n"
-#~ msgstr "Vim: Valmis.\n"
+#~ msgid "-x\t\t\tEdit encrypted files"
+#~ msgstr "-x\t\t\tMuokkaa salattua tiedostoa"
-#~ msgid "ERROR: "
-#~ msgstr "VIRHE: "
+#~ msgid "+\t\t\tStart at end of file"
+#~ msgstr "+\t\t\tAloita tiedoston lopusta"
-#~ msgid ""
-#~ "\n"
-#~ "[bytes] total alloc-freed %<PRIu64>-%<PRIu64>, in use %<PRIu64>, peak use "
-#~ "%<PRIu64>\n"
-#~ msgstr ""
-#~ "\n"
-#~ "[tavua] yht. alloc-free %<PRIu64>-%<PRIu64>, kytss %<PRIu64>, "
-#~ "kytthuippu %<PRIu64>\n"
+#~ msgid "-U <gvimrc>\t\tUse <gvimrc> instead of any .gvimrc"
+#~ msgstr "-U <gvimrc>\t\tKäytä <gvimrc>-tiedostoa .gvimrc:iden sijasta"
-#~ msgid ""
-#~ "[calls] total re/malloc()'s %<PRIu64>, total free()'s %<PRIu64>\n"
-#~ "\n"
-#~ msgstr ""
-#~ "[kutsut] yht. re/malloc() %<PRIu64>, yht. free() %<PRIu64>\n"
-#~ "\n"
+#~ msgid "--not-a-term\t\tSkip warning for input/output not being a terminal"
+#~ msgstr "--not-a-term\t\tOhita varoitus siitä että i/o ei ole terminaali"
-#~ msgid "E340: Line is becoming too long"
-#~ msgstr "E340: Rivist tulee liian pitk"
+#~ msgid "-T <terminal>\tSet terminal type to <terminal>"
+#~ msgstr "-T <terminaali>\tAseta terminaalin tyypiksi <terminaali>"
-#~ msgid "E341: Internal error: lalloc(%<PRId64>, )"
-#~ msgstr "E341: Sisinen virhe: lalloc(%<PRId64>, )"
+#~ msgid "-F\t\t\tStart in Farsi mode"
+#~ msgstr "-F\t\t\tkäynnistä farsi-tilassa"
-#~ msgid "E547: Illegal mouseshape"
-#~ msgstr "E547: Virheellinen hiiren muoto"
+#~ msgid "-H\t\t\tStart in Hebrew mode"
+#~ msgstr "-H\t\t\tkäynnistä heprea-tilassa"
-#~ msgid "Enter encryption key: "
-#~ msgstr "Anna salausavain: "
+#~ msgid "-A\t\t\tstart in Arabic mode"
+#~ msgstr "-A\t\t\tkäynnistä arabia-tilassa"
-#~ msgid "Enter same key again: "
-#~ msgstr "Anna sama avain uudestaan: "
+#~ msgid "-dev <device>\t\tUse <device> for I/O"
+#~ msgstr "-dev <laite>\t\tKäytä <laitetta> IO:hon"
-#~ msgid "Keys don't match!"
-#~ msgstr "Avaimet eivt tsm!"
+#~ msgid "-f\t\t\tDon't use newcli to open window"
+#~ msgstr "-f\t\t\tÄlä käytä newcli:tä ikkunan avaamiseen"
-#~ msgid "Cannot connect to Netbeans #2"
-#~ msgstr "Ei voi yhdist Netbeans #2:een"
+#~ msgid "-L\t\t\tSame as -r"
+#~ msgstr "-L\t\t\tkuten -r"
-#~ msgid "Cannot connect to Netbeans"
-#~ msgstr "Ei voi yhdist Netbeansiin"
+#~ msgid "-D\t\t\tDebugging mode"
+#~ msgstr "-D\t\t\tVianetsintätila"
-#~ msgid "E668: Wrong access mode for NetBeans connection info file: \"%s\""
-#~ msgstr "E668: Vr avaustila NetBeans-yhteyden infotiedostolle: %s"
+#~ msgid "-N\t\t\tNot fully Vi compatible: 'nocompatible'"
+#~ msgstr "-N\t\t\tEi Vi-yhteensopivuutta: nocompatible"
-#~ msgid "read from Netbeans socket"
-#~ msgstr "luettu Netbeans-soketista"
+#~ msgid "-C\t\t\tCompatible with Vi: 'compatible'"
+#~ msgstr "-C\t\t\tVi-yhteensopivuustila: compatible"
-#~ msgid "E658: NetBeans connection lost for buffer %<PRId64>"
-#~ msgstr "E658: NetBeans-yhteys katkesi puskurille %<PRId64>"
+#~ msgid "-l\t\t\tLisp mode"
+#~ msgstr "-l\t\t\tLisp-tila"
-#~ msgid "E511: netbeans already connected"
-#~ msgstr "E511: netbeans on yhdistetty jo"
+#~ msgid "-b\t\t\tBinary mode"
+#~ msgstr "-b\t\t\tBinääritila"
-#~ msgid "E505: "
-#~ msgstr "E505: "
+#~ msgid "-Z\t\t\tRestricted mode (like \"rvim\")"
+#~ msgstr "-Z\t\t\tRajoitettu tila (kuten rvimillä)"
-#~ msgid "E775: Eval feature not available"
-#~ msgstr "E775: Eval ei ole kytettviss"
+#~ msgid "-R\t\t\tReadonly mode (like \"view\")"
+#~ msgstr "-R\t\t\tKirjoitussuojattu tila (kuten view'lla)"
-#~ msgid "freeing %<PRId64> lines"
-#~ msgstr "vapautetaan %<PRId64> rivi"
+#~ msgid "-y\t\t\tEasy mode (like \"evim\", modeless)"
+#~ msgstr "-y\t\t\tHelppokäyttötila (kuten evimissä, ilman tiloja)"
-#~ msgid "E530: Cannot change term in GUI"
-#~ msgstr "E530: Ei voi vaihtaa termi GUIssa"
+#~ msgid "-d\t\t\tDiff mode (like \"vimdiff\")"
+#~ msgstr "-d\t\t\tDiff-tila (kuten vimdiffillä)"
-#~ msgid "E531: Use \":gui\" to start the GUI"
-#~ msgstr "E531: Kyt komentoa :gui GUIn kynnistmiseen"
+#~ msgid "-E\t\t\tImproved Ex mode"
+#~ msgstr "-E\t\t\tParanneltu Ex-tila"
-#~ msgid "E617: Cannot be changed in the GTK+ 2 GUI"
-#~ msgstr "E617: Ei voi muuttaa GTK+2-GUIssa"
+#~ msgid "-e\t\t\tEx mode (like \"ex\")"
+#~ msgstr "-e\t\t\tEx-tila (kute exillä)"
-#~ msgid "E596: Invalid font(s)"
-#~ msgstr "E596: Viallisia fontteja"
+#~ msgid "-v\t\t\tVi mode (like \"vi\")"
+#~ msgstr "-v\t\t\tVi-tila (kuten villä)"
-#~ msgid "E597: can't select fontset"
-#~ msgstr "E597: Fontsetin valinta ei onnistu"
+#~ msgid "-f or --nofork\tForeground: Don't fork when starting GUI"
+#~ msgstr "-f tai --nofork\tEdustalle: Älä haarauta GUIn käynnistyksessä"
-#~ msgid "E598: Invalid fontset"
-#~ msgstr "E598: Viallinen fontset"
+#~ msgid "-g\t\t\tRun using GUI (like \"gvim\")"
+#~ msgstr "-g\t\t\tAvaa GUI (kuten gvimillä)"
-#~ msgid "E533: can't select wide font"
-#~ msgstr "E533: Leven fontin valinta ei onnistu"
+#~ msgid "-unregister\t\tUnregister gvim for OLE"
+#~ msgstr "-unregister\t\tPoista gvim OLE-rekisteristä"
-#~ msgid "E534: Invalid wide font"
-#~ msgstr "E534: Viallinen leve fontti"
+#~ msgid "-register\t\tRegister this gvim for OLE"
+#~ msgstr "-register\t\trekisteröi gvim OLEa varten"
-#~ msgid "E538: No mouse support"
-#~ msgstr "E538: Hiirt ei tueta"
+#~ msgid ""
+#~ "\n"
+#~ "Where case is ignored prepend / to make flag upper case"
+#~ msgstr ""
+#~ "\n"
+#~ "Jos aakkoslaji on ohitettu, lisää alkuun / tehdäksesi asetuksesta "
+#~ "suuraakkosia"
-#~ msgid "cannot open "
-#~ msgstr "ei voi avata "
+#~ msgid ""
+#~ "\n"
+#~ " or:"
+#~ msgstr ""
+#~ "\n"
+#~ " tai:"
-#~ msgid "VIM: Can't open window!\n"
-#~ msgstr "VIM: Ei voi avata ikkunaa\n"
+#~ msgid " vim [arguments] "
+#~ msgstr " vim [argumentit] "
-#~ msgid "Need Amigados version 2.04 or later\n"
-#~ msgstr "Amigados 2.04 tai uudempi tarvitaan\n"
+#~ msgid "Vim: Error: This version of Vim does not run in a Cygwin terminal\n"
+#~ msgstr "Vim: Virhe: Tämä versio Vimistä ei toimi Cygwinin terminaalissa\n"
-#~ msgid "Need %s version %<PRId64>\n"
-#~ msgstr "Tarvitaan %s versio %<PRId64>\n"
+#~ msgid "Vim: Error: Failure to start gvim from NetBeans\n"
+#~ msgstr "Vim: Virhe: Gvimin käynnistys NetBeansistä ei onnistu\n"
-#~ msgid "Cannot open NIL:\n"
-#~ msgstr "Ei voi avata NILi:\n"
+#~ msgid "This Vim was not compiled with the diff feature."
+#~ msgstr "Tähän Vimiin ei ole käännetty diff-toimintoja mukaan."
-#~ msgid "Cannot create "
-#~ msgstr "Ei voi luoda "
+#~ msgid "'-nb' cannot be used: not enabled at compile time\n"
+#~ msgstr "-nb:tä ei voi käyttää, koska sitä ei käännetty mukaan\n"
-#~ msgid "Vim exiting with %d\n"
-#~ msgstr "Vim sulkeutuu koodilla %d\n"
+#~ msgid "netbeans is not supported with this GUI\n"
+#~ msgstr "netbeans ei toimi tässä käyttöliittymässä\n"
-#~ msgid "cannot change console mode ?!\n"
-#~ msgstr "ei voi vaihtaa konsolitilaa?\n"
+#~ msgid "%d files to edit\n"
+#~ msgstr "%d tiedostoa muokattavana\n"
-#~ msgid "mch_get_shellsize: not a console??\n"
-#~ msgstr "mch_get_shellsize: ei ole konsoli?\n"
+#~ msgid "E251: VIM instance registry property is badly formed. Deleted!"
+#~ msgstr "E251: VIMin instanssin rekisteriarvo on virheellinen, poistettiin."
-#~ msgid "E360: Cannot execute shell with -f option"
-#~ msgstr "E360: Kuorta ei voi avata asetuksella -f"
+#~ msgid "E573: Invalid server id used: %s"
+#~ msgstr "E573: Virheellinen palvelimen tunniste: %s"
-#~ msgid "Cannot execute "
-#~ msgstr "Ei voi suorittaa "
+#~ msgid "E248: Failed to send command to the destination program"
+#~ msgstr "E248: Komennon lähetys kohdeohjelmalle ei onnistu"
-#~ msgid "shell "
-#~ msgstr "kuori "
+#~ msgid "Unable to register a command server name"
+#~ msgstr "Komentopalvelimen nimen rekisteröinti ei onnistu"
-#~ msgid " returned\n"
-#~ msgstr " palautti\n"
+#~ msgid "cannot get line"
+#~ msgstr "ei voida hakea riviä"
-#~ msgid "ANCHOR_BUF_SIZE too small."
-#~ msgstr "ANCHOR_BUF_SIZE liian pieni."
+#~ msgid "E572: exit code %d"
+#~ msgstr "E572: palautusarvo %d"
-#~ msgid "I/O ERROR"
-#~ msgstr "IO-virhe"
+#~ msgid ""
+#~ "E571: Sorry, this command is disabled: the Tcl library could not be "
+#~ "loaded."
+#~ msgstr "E571: komento ei toimi, Tcl-kirjastoa ei voitu ladata."
-#~ msgid "Message"
-#~ msgstr "Viesti"
+#~ msgid "cannot register callback command: buffer/window reference not found"
+#~ msgstr ""
+#~ "callbackia ei voi rekisteröidä: puskurin tai ikkunan viitettä ei löydy"
-#~ msgid "'columns' is not 80, cannot execute external commands"
-#~ msgstr "columns ei ole 80, ei voi suorittaa ulkoista komentoa"
+#~ msgid ""
+#~ "E280: TCL FATAL ERROR: reflist corrupt!? Please report this to vim-"
+#~ "dev@vim.org"
+#~ msgstr ""
+#~ "E280: kriittinen TCL-virhe: reflist hajalla? Ilmoita asiasta "
+#~ "postituslistalle vim-dev@vim.org"
-#~ msgid "E237: Printer selection failed"
-#~ msgstr "E237: Tulostimen valinta eponnistui"
+#~ msgid ""
+#~ "cannot register callback command: buffer/window is already being deleted"
+#~ msgstr "callbackia ei voi rekisteröidä: puskuri tai ikkuna on poistettu"
-#~ msgid "to %s on %s"
-#~ msgstr "tulostimelle %s kohteessa %s"
+#~ msgid "cannot create buffer/window command: object is being deleted"
+#~ msgstr "ei voi luoda puskuri- tai ikkunakomentoa, olio on poistumassa"
-#~ msgid "E613: Unknown printer font: %s"
-#~ msgstr "E613: Tuntematon tulostimen fontti: %s"
+#~ msgid "vim error"
+#~ msgstr "vim-virhe"
-#~ msgid "E238: Print error: %s"
-#~ msgstr "E238: Tulostinvirhe: %s"
+#~ msgid "unknown vimOption"
+#~ msgstr "tuntematon vimOption"
-#~ msgid "Printing '%s'"
-#~ msgstr "Tulostetaan %s"
+#~ msgid "unknown flag: "
+#~ msgstr "tuntematon asetus: "
-#~ msgid "E244: Illegal charset name \"%s\" in font name \"%s\""
-#~ msgstr "E244: Virheellinen merkistn nimi %s fontin nimess %s"
+#~ msgid "cannot insert/append line"
+#~ msgstr "rivin lisäys ei onnistu"
-#~ msgid "E245: Illegal char '%c' in font name \"%s\""
-#~ msgstr "E245: Virheellinen merkki %c fontin nimess %s"
+#~ msgid "row %d column %d"
+#~ msgstr "rivi %d sarake %d"
+
+#~ msgid "mark not set"
+#~ msgstr "merkko ei ole asetettu"
+
+#~ msgid "cannot set line(s)"
+#~ msgstr "ei voi asettaa rivejä"
-#~ msgid "Vim: Double signal, exiting\n"
-#~ msgstr "Vim: Kaksoissignaali, lopetetaan\n"
+#~ msgid "not implemented yet"
+#~ msgstr "ei toteutettu"
-#~ msgid "Vim: Caught deadly signal %s\n"
-#~ msgstr "Vim: Tappava signaali %s\n"
+#~ msgid "E273: unknown longjmp status %d"
+#~ msgstr "E273: tuntematon longjmp-tila %d"
-#~ msgid "Vim: Caught deadly signal\n"
-#~ msgstr "Vim: Tappava signaali\n"
+#~ msgid "E272: unhandled exception"
+#~ msgstr "E272: käsittelemätön poikkeus"
-#~ msgid "Opening the X display took %<PRId64> msec"
-#~ msgstr "X-nytn avaus vei %<PRId64> millisekuntia"
+#~ msgid "E271: retry outside of rescue clause"
+#~ msgstr "E271: retry rescuen ulkopuolella"
-#~ msgid ""
-#~ "\n"
-#~ "Vim: Got X error\n"
-#~ msgstr ""
-#~ "\n"
-#~ "Vim: X-virhe\n"
+#~ msgid "E269: unexpected break"
+#~ msgstr "E269: Odotuksenvastainen break"
-#~ msgid "Testing the X display failed"
-#~ msgstr "X-nytn testaus eponnistui"
+#~ msgid "E268: unexpected next"
+#~ msgstr "E268: Odotuksenvastainen next"
-#~ msgid "Opening the X display timed out"
-#~ msgstr "X-nytn avaus aikakatkaistiin"
+#~ msgid "E267: unexpected return"
+#~ msgstr "E267: odotuksenvastainen return"
#~ msgid ""
-#~ "\n"
-#~ "Cannot execute shell sh\n"
+#~ "E266: Sorry, this command is disabled, the Ruby library could not be "
+#~ "loaded."
+#~ msgstr "E266: komento ei toimi, Ruby-kirjastoa ei voitu ladata."
+
+#~ msgid "E265: $_ must be an instance of String"
+#~ msgstr "E265: muuttujan $_ pitää olla Stringin instanssi"
+
+#~ msgid "E837: This Vim cannot execute :py3 after using :python"
#~ msgstr ""
-#~ "\n"
-#~ "Kuoren sh suoritus ei onnistu\n"
+#~ "E837: Python: Ei voi käyttää komentoja :py ja :py3 samassa istunnossa"
+
+#~ msgid "E659: Cannot invoke Python recursively"
+#~ msgstr "E659: Pythonia ei voi kutsua rekursiivisesti"
#~ msgid ""
-#~ "\n"
-#~ "Cannot create pipes\n"
+#~ "E887: Sorry, this command is disabled, the Python's site module could not "
+#~ "be loaded."
#~ msgstr ""
-#~ "\n"
-#~ "Putkia ei voi tehd\n"
+#~ "E887: Komento ei toimi, Pythonin site-moduulien lataaminen ei onnistunut."
#~ msgid ""
-#~ "\n"
-#~ "Cannot fork\n"
+#~ "E263: Sorry, this command is disabled, the Python library could not be "
+#~ "loaded."
+#~ msgstr "E263: komento ei toimi, Python-kirjaston lataaminen ei onnistunut."
+
+#~ msgid "E836: This Vim cannot execute :python after using :py3"
#~ msgstr ""
-#~ "\n"
-#~ "Ei voi haarauttaa\n"
+#~ "E836: Python: Ei voi käyttää komentoja :py ja :py3 samassa istunnossa"
+
+#~ msgid "not allowed in the Vim sandbox"
+#~ msgstr "ei sallittu Vimin hiekkalaatikossa"
+
+#~ msgid "linenr out of range"
+#~ msgstr "rivinumero arvoalueen ulkopuolelta"
+
+#~ msgid "window is invalid"
+#~ msgstr "ikkuna on virheellinen"
+
+#~ msgid "buffer is invalid"
+#~ msgstr "puskuri on virheellinen"
+
+#~ msgid "Vim error"
+#~ msgstr "Vim-virhe"
+
+#~ msgid "Vim error: ~a"
+#~ msgstr "Vim-virhe: ~a"
+
+#~ msgid "couldn't open buffer"
+#~ msgstr "ei voitu avata puskuria"
+
+#~ msgid "unknown option"
+#~ msgstr "tuntematon asetus"
+
+#~ msgid "hidden option"
+#~ msgstr "piilotettu asetus"
+
+#~ msgid "expressions disabled at compile time"
+#~ msgstr "ilmaukset poistettu käytöstä käännösaikana"
+
+#~ msgid "invalid expression"
+#~ msgstr "virheellinen ilmaus"
#~ msgid ""
-#~ "\n"
-#~ "Command terminated\n"
+#~ "E895: Sorry, this command is disabled, the MzScheme's racket/base module "
+#~ "could not be loaded."
#~ msgstr ""
-#~ "\n"
-#~ "Komento loppui\n"
+#~ "E895: Komento ei toimi, MzScheme-moduulia racket/base ei voitu ladata."
-#~ msgid "XSMP lost ICE connection"
-#~ msgstr "XSMP kadotti ICE-yhteyden"
+#~ msgid ""
+#~ "E815: Sorry, this command is disabled, the MzScheme libraries could not "
+#~ "be loaded."
+#~ msgstr "E815: komento ei toimi, MzScheme-kirjastoa ei voitu ladata."
-#~ msgid "Opening the X display failed"
-#~ msgstr "X-nytn avaus eponnistui"
+#~ msgid "Lua library cannot be loaded."
+#~ msgstr "Luan kirjastoa ei voitu ladata."
-#~ msgid "XSMP handling save-yourself request"
-#~ msgstr "XSMP ksittelee save-yourself-pyynt"
+#~ msgid "E626: cannot get cscope database information"
+#~ msgstr "E626: ei voi hakea cscope-tietokannan tietoja"
-#~ msgid "XSMP opening connection"
-#~ msgstr "XSMP avaa yhteytt"
+#~ msgid "E625: cannot open cscope database: %s"
+#~ msgstr "E625: ei voi avata cscope-tietokantaa: %s"
-#~ msgid "XSMP ICE connection watch failed"
-#~ msgstr "XSMP:n ICE-yhteyden tarkkailu eponnistui"
+#~ msgid "E563: stat error"
+#~ msgstr "E563: stat-virhe"
-#~ msgid "XSMP SmcOpenConnection failed: %s"
-#~ msgstr "XSMP SmcOpenConnection eponnistui: %s"
+#~ msgid "E256: Hangul automata ERROR"
+#~ msgstr "E256: Hangu-automaattivirhe"
-#~ msgid "At line"
-#~ msgstr "Rivill"
+#~ msgid "Size:"
+#~ msgstr "Koko:"
-#~ msgid "Could not load vim32.dll!"
-#~ msgstr "Vim32.dll: ei voitu ladata"
+#~ msgid "Style:"
+#~ msgstr "Tyyli:"
-#~ msgid "VIM Error"
-#~ msgstr "VIM-virhe"
+#~ msgid "Font:"
+#~ msgstr "Fontti:"
-#~ msgid "Could not fix up function pointers to the DLL!"
-#~ msgstr "Ei voitu korjata funktio-osoittimia DLL:ss"
+#~ msgid "Encoding:"
+#~ msgstr "Koodaus:"
-#~ msgid "shell returned %d"
-#~ msgstr "kuori palautti arvon %d"
+#~ msgid "Show size in Points"
+#~ msgstr "Näytä koko pisteinä"
-#~ msgid "Vim: Caught %s event\n"
-#~ msgstr "Vim: Napattiin %s\n"
+#~ msgid "Name:"
+#~ msgstr "Nimi:"
-#~ msgid "close"
-#~ msgstr "sulkeminen"
+#~ msgid "Vim - Font Selector"
+#~ msgstr "Vim - fonttivalitsin"
-#~ msgid "logoff"
-#~ msgstr "uloskirjautuminen"
+#~ msgid "no specific match"
+#~ msgstr "ei tarkkaa täsmäystä"
-#~ msgid "shutdown"
-#~ msgstr "sammutus"
+#~ msgid "&Dismiss"
+#~ msgstr "&Ohita"
-#~ msgid "E371: Command not found"
-#~ msgstr "E371: Komentoa ei lydy"
+#~ msgid "Invalid font specification"
+#~ msgstr "Virheellinen fonttimääritys"
+
+#~ msgid "Font1 width: %ld"
+#~ msgstr "Fontti1:n leveys: %ld"
+
+#~ msgid "Font0 width: %ld"
+#~ msgstr "Fontti0:n leveys: %ld"
+
+#~ msgid "Font%ld width is not twice that of font0"
+#~ msgstr "Fontti%ld:n leveys ei ole kaksi kertaa fontti0:n"
+
+#~ msgid "Font1: %s"
+#~ msgstr "Fontti1: %s"
+
+#~ msgid "Font0: %s"
+#~ msgstr "Fontti0: %s"
+
+#~ msgid "E253: Fontset name: %s"
+#~ msgstr "E253: Fontsetin nimi: %s"
+
+#~ msgid "Font '%s' is not fixed-width"
+#~ msgstr "Fontti %s ei ole tasavälinen"
+
+#~ msgid "E252: Fontset name: %s"
+#~ msgstr "E252: Fontsetin nimi: %s"
+
+#~ msgid "E250: Fonts for the following charsets are missing in fontset %s:"
+#~ msgstr "E250: Seuraavien merkistöjoukkojen fontit puuttuvat fontsetistä %s:"
#~ msgid ""
-#~ "VIMRUN.EXE not found in your $PATH.\n"
-#~ "External commands will not pause after completion.\n"
-#~ "See :help win32-vimrun for more information."
+#~ "Vim E458: Cannot allocate colormap entry, some colors may be incorrect"
#~ msgstr ""
-#~ "VIMRUN.EXE ei lydy muuttujasta $PATH.\n"
-#~ "Ulkoiset komennot eivt pyshdy suorituksen lopussa.\n"
-#~ "Listietoja komennolla :help win32-vimrun"
+#~ "Vim E458: Ei voi varata värikartan alkiota, värit voivat mennä väärin"
-#~ msgid "Vim Warning"
-#~ msgstr "Vim-varoitus"
+# MDI eli windowsin moni-ikkunasovellus
+#~ msgid "E672: Unable to open window inside MDI application"
+#~ msgstr "E672: Ikkunaa ei voitu avata MDI-sovellukseen"
-#~ msgid "Error file"
-#~ msgstr "Virhetiedosto"
+# OLE on object linking and embedding på windowska
+#~ msgid "E243: Argument not supported: \"-%s\"; Use the OLE version."
+#~ msgstr "E243: Argumenttia ei tueta: -%s, käytä OLE-versiota"
-#~ msgid "Conversion in %s not supported"
-#~ msgstr "Muutosta kohteessa %s ei tueta"
+#~ msgid "Directory\t*.nothing\n"
+#~ msgstr "Hakemisto\t*.nothing\n"
-#~ msgid "E430: Tag file path truncated for %s\n"
-#~ msgstr "E430: Tgitiedoston polku katkaistu kohdassa %s\n"
+#~ msgid "Not Used"
+#~ msgstr "Ei käytössä"
-#~ msgid "new shell started\n"
-#~ msgstr "uusi kuori avattu\n"
+#~ msgid "Find & Replace (use '\\\\' to find a '\\')"
+#~ msgstr "Etsi ja korvaa (\\\\:llä löytää \\:t)"
-#~ msgid "Used CUT_BUFFER0 instead of empty selection"
-#~ msgstr "Kytettiin CUT_BUFFER0:aa tyhjn valinnan sijaan"
+#~ msgid "Find string (use '\\\\' to find a '\\')"
+#~ msgstr "Etsi merkkijonoa (\\\\:llä löytää \\:t)"
-#~ msgid "No undo possible; continue anyway"
-#~ msgstr "Ei voi kumota, jatketaan silti"
+#~ msgid "Open tab..."
+#~ msgstr "Avaa välilehti..."
-#~ msgid "E832: Non-encrypted file has encrypted undo file: %s"
-#~ msgstr "E832: Salaamattomalla tiedostolla on salattu kumoustiedosto: %s"
+#~ msgid "&Undo"
+#~ msgstr "&Kumoa"
-#~ msgid "E826: Undo file decryption failed: %s"
-#~ msgstr "E826: Kumoustiedoston purku eponnistui: %s"
+#~ msgid "Replace &All"
+#~ msgstr "Korvaa k&aikki"
-#~ msgid "E827: Undo file is encrypted: %s"
-#~ msgstr "E827: Kumoustiedosto on salattu: %s"
+#~ msgid "&Replace"
+#~ msgstr "Ko&rvaa"
-#~ msgid ""
-#~ "\n"
-#~ "MS-Windows 16/32-bit GUI version"
-#~ msgstr ""
-#~ "\n"
-#~ "MS-Windows 16- t. 32-bittinen GUI-versio"
+#~ msgid "Find &Next"
+#~ msgstr "Hae &seuraava"
-#~ msgid ""
-#~ "\n"
-#~ "MS-Windows 64-bit GUI version"
-#~ msgstr ""
-#~ "\n"
-#~ "MS-Windows 64-bittinen GUI-versio"
+#~ msgid "Selection"
+#~ msgstr "Valinta"
-#~ msgid ""
-#~ "\n"
-#~ "MS-Windows 32-bit GUI version"
-#~ msgstr ""
-#~ "\n"
-#~ "MS-Windows 32-bittinen GUI-version"
+#~ msgid "&OK"
+#~ msgstr "&Ok"
-#~ msgid " in Win32s mode"
-#~ msgstr " Win32s-tilassa"
+#~ msgid "Files"
+#~ msgstr "Tiedostot"
-#~ msgid " with OLE support"
-#~ msgstr " OLE-tuella"
+#~ msgid "&Help"
+#~ msgstr "O&hje"
-#~ msgid ""
-#~ "\n"
-#~ "MS-Windows 64-bit console version"
-#~ msgstr ""
-#~ "\n"
-#~ "MS-Windows 32-bittinen konsoliversio"
+#~ msgid "Filter"
+#~ msgstr "Suodatus"
-#~ msgid ""
-#~ "\n"
-#~ "MS-Windows 32-bit console version"
-#~ msgstr ""
-#~ "\n"
-#~ "MS-Windows 32-bittinen konsoliversio"
+#~ msgid "Directories"
+#~ msgstr "Hakemistot"
-#~ msgid ""
-#~ "\n"
-#~ "MS-Windows 16-bit version"
-#~ msgstr ""
-#~ "\n"
-#~ "MS-Windows 16-bittinen versio"
+#~ msgid "&Cancel"
+#~ msgstr "&Peru"
-#~ msgid ""
-#~ "\n"
-#~ "32-bit MS-DOS version"
-#~ msgstr ""
-#~ "\n"
-#~ "32-bittinen MS-DOS-versio"
+#~ msgid "&Filter"
+#~ msgstr "&Suodata"
-#~ msgid ""
-#~ "\n"
-#~ "16-bit MS-DOS version"
-#~ msgstr ""
-#~ "\n"
-#~ "16-bittinen MS-DOS-versio"
+#~ msgid "Vim: Main window unexpectedly destroyed\n"
+#~ msgstr "Vim: Pääikkuna tuhoutui odottamatta\n"
-#~ msgid ""
-#~ "\n"
-#~ "MacOS X (unix) version"
-#~ msgstr ""
-#~ "\n"
-#~ "MacOS X-version (unix)"
+#~ msgid "Open Tab..."
+#~ msgstr "Avaa välilehti..."
-#~ msgid ""
-#~ "\n"
-#~ "MacOS X version"
-#~ msgstr ""
-#~ "\n"
-#~ "MacOS X-version"
+#~ msgid "New tab"
+#~ msgstr "Uusi välilehti"
-#~ msgid ""
-#~ "\n"
-#~ "MacOS version"
-#~ msgstr ""
-#~ "\n"
-#~ "MacOS-version"
+#~ msgid "Close tab"
+#~ msgstr "Sulje välilehti"
-#~ msgid ""
-#~ "\n"
-#~ "RISC OS version"
-#~ msgstr ""
-#~ "\n"
-#~ "RISC OS-version"
+#~ msgid "Vim: Received \"die\" request from session manager\n"
+#~ msgstr "Vim: sessiomanageri lähetti die-pyynnön\n"
-#~ msgid ""
-#~ "\n"
-#~ "OpenVMS version"
-#~ msgstr ""
-#~ "\n"
-#~ "OpenVMS-version"
+#~ msgid "_Close"
+#~ msgstr "_Sulje"
-#~ msgid ""
-#~ "\n"
-#~ "Big version "
-#~ msgstr ""
-#~ "\n"
-#~ "Big-version "
+#~ msgid "Replace All"
+#~ msgstr "Korvaa kaikki"
-#~ msgid ""
-#~ "\n"
-#~ "Normal version "
-#~ msgstr ""
-#~ "\n"
-#~ "Normal-versio "
+#~ msgid "Replace"
+#~ msgstr "Korvaa"
-#~ msgid ""
-#~ "\n"
-#~ "Small version "
-#~ msgstr ""
-#~ "\n"
-#~ "Small-versio "
+#~ msgid "Find Next"
+#~ msgstr "Etsi seuraava"
-#~ msgid ""
-#~ "\n"
-#~ "Tiny version "
-#~ msgstr ""
-#~ "\n"
-#~ "Tiny-versio "
+#~ msgid "Down"
+#~ msgstr "Alas"
-#~ msgid "with GTK2-GNOME GUI."
-#~ msgstr "GTK2-Gnome-GUIlla."
+#~ msgid "Up"
+#~ msgstr "Ylös"
-#~ msgid "with GTK2 GUI."
-#~ msgstr "GTK2-GUIlla."
+#~ msgid "Direction"
+#~ msgstr "Suunta"
-#~ msgid "with X11-Motif GUI."
-#~ msgstr "X11-Motif-GUIlla."
+#~ msgid "Match case"
+#~ msgstr "Kirjaintaso"
-#~ msgid "with X11-neXtaw GUI."
-#~ msgstr "X11-neXtaw-GUIlla."
+#~ msgid "Match whole word only"
+#~ msgstr "Korvaa kokonaisia sanoja"
-#~ msgid "with X11-Athena GUI."
-#~ msgstr "X11-Athena-GUIlla."
+#~ msgid "Replace with:"
+#~ msgstr "Korvaa:"
-#~ msgid "with Photon GUI."
-#~ msgstr "Photon-GUIlla."
+#~ msgid "Find what:"
+#~ msgstr "Etsi:"
-#~ msgid "with GUI."
-#~ msgstr "GUIlla."
+#~ msgid "VIM - Search..."
+#~ msgstr "VIM - Etsi..."
-#~ msgid "with Carbon GUI."
-#~ msgstr "Carbon-GUIlla."
+#~ msgid "VIM - Search and Replace..."
+#~ msgstr "VIM - Etsi ja korvaa..."
-#~ msgid "with Cocoa GUI."
-#~ msgstr "Cocoa-GUIlla."
+#~ msgid "Input _Methods"
+#~ msgstr "Syöte_menetelmät"
-#~ msgid "with (classic) GUI."
-#~ msgstr "perinteisell GUIlla."
+#~ msgid "No"
+#~ msgstr "Ei"
-#~ msgid " system gvimrc file: \""
-#~ msgstr " jrjestelmn gvimrc: \""
+#~ msgid "Yes"
+#~ msgstr "Kyllä"
-#~ msgid " user gvimrc file: \""
-#~ msgstr " kyttjn gvimrc: \""
+#~ msgid "_OK"
+#~ msgstr "_OK"
-#~ msgid "2nd user gvimrc file: \""
-#~ msgstr "2. kyttjn gvimrc: \""
+#~ msgid "_Open"
+#~ msgstr "_Avaa"
-#~ msgid "3rd user gvimrc file: \""
-#~ msgstr "3. kyttjn gvimrc: \""
+#~ msgid "_Save"
+#~ msgstr "_Tallenna"
-#~ msgid " system menu file: \""
-#~ msgstr " jrjestelmvalikko: \""
+#~ msgid "_Cancel"
+#~ msgstr "_Peru"
-#~ msgid "Compiler: "
-#~ msgstr "Knnin: "
+#~ msgid "E232: Cannot create BalloonEval with both message and callback"
+#~ msgstr "E232: Ei voi luoda BalloonEvalia viestille ja callbackille"
-#~ msgid "menu Help->Orphans for information "
-#~ msgstr "valikko Ohje->Orvot listietoja varten "
+#~ msgid "Vim dialog"
+#~ msgstr "Vim-ikkuna"
-#~ msgid "Running modeless, typed text is inserted"
-#~ msgstr "Suoritetaan tilattomana, kirjoitettu teksti sytetn"
+#~ msgid "Scrollbar Widget: Could not get geometry of thumb pixmap."
+#~ msgstr "Vierityspalkki: Pixmapin geometria ei selviä"
-#~ msgid "menu Edit->Global Settings->Toggle Insert Mode "
-#~ msgstr "valikko Muokkaa->Yleiset asetukset->Vaihda sytetilaa"
+#~ msgid "Cancel"
+#~ msgstr "Peru"
-#~ msgid " for two modes "
-#~ msgstr " kahta tilaa varten "
+#~ msgid "OK"
+#~ msgstr "OK"
-#~ msgid "menu Edit->Global Settings->Toggle Vi Compatible"
-#~ msgstr "valikko Muokkaa->Yleiset asetukset->Vaihda Vi-yhteensopivuutta"
+#~ msgid "E615: vim_SelFile: can't get current directory"
+#~ msgstr "E615: vim_SelFile: nykyistä hakemistoa ei saada selville"
-#~ msgid " for Vim defaults "
-#~ msgstr " Vim-oletuksia varten"
+#~ msgid "Pathname:"
+#~ msgstr "Polku:"
-#~ msgid "WARNING: Windows 95/98/ME detected"
-#~ msgstr "VAROITUS: Window 95/98/ME havaittu"
+#~ msgid "E614: vim_SelFile: can't return to current directory"
+#~ msgstr "E614: vim_SelFile: nykyiseen hakemistoon ei voi palata"
-#~ msgid "type :help windows95<Enter> for info on this"
-#~ msgstr "kirjoita :help windows95<Enter> listietoja varten"
+#~ msgid "E616: vim_SelFile: can't get font %s"
+#~ msgstr "E616: vim_SelFile: ei saada fonttia %s"
-#~ msgid "E370: Could not load library %s"
-#~ msgstr "E370: Kirjaston %s lataaminen ei onnistu"
+#~ msgid "<cannot open> "
+#~ msgstr "<ei voi avata> "
+
+#~ msgid "No match at cursor, finding next"
+#~ msgstr "Ei täsmäystä kursorin alla, etsitään seuraava"
+
+#~ msgid "E599: Value of 'imactivatekey' is invalid"
+#~ msgstr "E599: imactivatekeyn arvo on virheellinen"
+
+#~ msgid "E231: 'guifontwide' invalid"
+#~ msgstr "E231: guifontwide virheellinen"
+
+#~ msgid "E665: Cannot start GUI, no valid font found"
+#~ msgstr "E665: Ei voi avata GUIta, sopivaa fonttia ei löydy"
+
+#~ msgid "E230: Cannot read from \"%s\""
+#~ msgstr "E230: Ei voi lukea kohteesta %s"
+
+#~ msgid "E229: Cannot start the GUI"
+#~ msgstr "E229: GUIn käynnistys ei onnistu"
+
+#~ msgid "E851: Failed to create a new process for the GUI"
+#~ msgstr "E851: Ei voitu luoda uutta prosessia käyttöliittymälle"
+
+# tietääkseni resurssiforkki on applen tiedostojärjestelmän tunnistejuttujuttu
+#~ msgid "E460: The resource fork would be lost (add ! to override)"
+#~ msgstr "E460: resurssiosa häviäisi (lisää komentoon ! ohittaaksesi)"
+
+#~ msgid "writing to device disabled with 'opendevice' option"
+#~ msgstr "laitteeseen kirjoittaminen pois käytöstä opendevice-asetuksella"
+
+#~ msgid "Partial writes disallowed for NetBeans buffers"
+#~ msgstr "Osittaiset kirjoitukset kielletty NetBeans-puskureissa"
+
+#~ msgid "NetBeans disallows writes of unmodified buffers"
+#~ msgstr "NetBeans ei salli kirjoittaa muokkaamattomiin puskureihin"
+
+#~ msgid "Reading from stdin..."
+#~ msgstr "Luetaan vakiosyötteestä"
+
+#~ msgid "Vim: Reading from stdin...\n"
+#~ msgstr "Vim: Luetaan vakiosyötteestä...\n"
+
+#~ msgid "is a device (disabled with 'opendevice' option)"
+#~ msgstr "on laite (ei käytössä opendevice-asetuksen takia)"
+
+#~ msgid "Debug Line"
+#~ msgstr "Vianetsintärivi"
+
+#~ msgid "Input Line"
+#~ msgstr "Syöterivi"
+
+#~ msgid "Expression"
+#~ msgstr "Ilmaus"
+
+#~ msgid "Search String"
+#~ msgstr "Hakujono"
+
+#~ msgid "Command Line"
+#~ msgstr "Komentorivi"
#~ msgid ""
-#~ "Sorry, this command is disabled: the Perl library could not be loaded."
-#~ msgstr "Sori, komento ei toimi, Perl kirjastoa ei voinut ladata."
+#~ "\n"
+#~ "# %s History (newest to oldest):\n"
+#~ msgstr ""
+#~ "\n"
+#~ "# %s Historia (uusimmasta alkaen):\n"
-#~ msgid "E299: Perl evaluation forbidden in sandbox without the Safe module"
-#~ msgstr "E299: Perl-suoritus kielletty hiekkalaatikossa ilman Safe-moduulia"
+#~ msgid "E196: No digraphs in this version"
+#~ msgstr "E196: Digraafeja ei ole tässä versiossa"
-#~ msgid "Edit with &multiple Vims"
-#~ msgstr "&Muokkaa usealla Vimill"
+#~ msgid "E195: Cannot open viminfo file for reading"
+#~ msgstr "E195: Viminfoa ei voi avata lukemista varten"
-#~ msgid "Edit with single &Vim"
-#~ msgstr "Muokkaa yhdell &Vimill"
+#~ msgid "E809: #< is not available without the +eval feature"
+#~ msgstr "E809: #< ei ole käytössä jollei +eval ole päällä"
-#~ msgid "Diff with Vim"
-#~ msgstr "Diffi Vimill"
+#~ msgid "Save Setup"
+#~ msgstr "Tallenna asetukset"
-#~ msgid "Edit with &Vim"
-#~ msgstr "Muokkaa &Vimill"
+#~ msgid "Save Session"
+#~ msgstr "Tallenna sessio"
-#~ msgid "Edit with existing Vim - "
-#~ msgstr "Muokkaa olemassaolevalla Vimill - "
+#~ msgid "Save View"
+#~ msgstr "Tallenna näkymä"
-#~ msgid "Edits the selected file(s) with Vim"
-#~ msgstr "Muokkaa valittuja tiedostoja Vimill"
+#~ msgid "Save Redirection"
+#~ msgstr "Tallenna uudelleenosoitus"
-#~ msgid "Error creating process: Check if gvim is in your path!"
-#~ msgstr "Virhe prosessin kynnistmisess, varmista ett gvim on polulla"
+#~ msgid "E930: Cannot use :redir inside execute()"
+#~ msgstr "E930: Komentoa :redir ei voi käyttää funktion execute() sisällä"
-#~ msgid "gvimext.dll error"
-#~ msgstr "gvimext.dll-virhe"
+#~ msgid "E466: :winpos requires two number arguments"
+#~ msgstr "E466: :winpos vaatii kaksi lukuargumenttia"
-#~ msgid "Path length too long!"
-#~ msgstr "Liian pitk polku"
+#~ msgid "E188: Obtaining window position not implemented for this platform"
+#~ msgstr "E188: Ikkunan sijainnin selvitys ei toimi tällä alustalla"
-#~ msgid "E234: Unknown fontset: %s"
-#~ msgstr "E234: Tuntematon fontset: %s"
+#~ msgid "Window position: X %d, Y %d"
+#~ msgstr "Ikkunan sijainti: X %d, Y %d"
-#~ msgid "E235: Unknown font: %s"
-#~ msgstr "E235: Tuntematon fontti: %s"
+#~ msgid ""
+#~ "E747: Cannot change directory, buffer is modified (add ! to override)"
+#~ msgstr ""
+#~ "E747: Hakemistoa ei voida muuttaa, puskuria on muokattu (lisää "
+#~ "komentoon ! ohittaaksesi"
-#~ msgid "E236: Font \"%s\" is not fixed-width"
-#~ msgstr "E236: Fontti %s ei ole tasavlinen"
+#~ msgid "Append File"
+#~ msgstr "Lisää tiedostoon"
-#~ msgid "E448: Could not load library function %s"
-#~ msgstr "E448: Ei voitu ladta kirjastofunktiota %s"
+#~ msgid "Edit File in new window"
+#~ msgstr "Muokkaa uudessa ikkunassa"
-#~ msgid "E26: Hebrew cannot be used: Not enabled at compile time\n"
-#~ msgstr "E26: Hepreaa ei voi kytt, koska sit ei knnetty mukaan\n"
+#~ msgid "unknown"
+#~ msgstr "tuntematon"
-#~ msgid "E27: Farsi cannot be used: Not enabled at compile time\n"
-#~ msgstr "E27: Farsia ei voi kytt, koska sit ei knnetty mukaan\n"
+#~ msgid "E172: Only one file name allowed"
+#~ msgstr "E172: Vain yksi tiedostonimi sallitaan"
-#~ msgid "E800: Arabic cannot be used: Not enabled at compile time\n"
-#~ msgstr "E800: Arabiaa ei voi kytt, koska sit ei knnetty mukaan\n"
+#~ msgid "Source Vim script"
+#~ msgstr "Lataa vim-skripti"
-#~ msgid "E247: no registered server named \"%s\""
-#~ msgstr "E247: palvelinta %s ei ole rekisterityn"
+#~ msgid " (NOT FOUND)"
+#~ msgstr " (EI LÖYTYNYT)"
-#~ msgid "E233: cannot open display"
-#~ msgstr "E233: nytt ei voi avata"
+#~ msgid ""
+#~ "\n"
+#~ "# Last Substitute String:\n"
+#~ "$"
+#~ msgstr ""
+#~ "\n"
+#~ "# Viimeisin korvausmerkkijono:\n"
+#~ "$"
-#~ msgid "E449: Invalid expression received"
-#~ msgstr "E449: Virheellinen ilmaus saatu"
+#~ msgid "Edit File"
+#~ msgstr "Muokkaa tiedostoa"
-#~ msgid "E463: Region is guarded, cannot modify"
-#~ msgstr "E463: Alue on suojattu, muuttaminen ei onnistu"
+#~ msgid "Save As"
+#~ msgstr "Tallenna nimellä"
-#~ msgid "E744: NetBeans does not allow changes in read-only files"
-#~ msgstr "E744: NetBeans ei tue muutoksia kirjoitussuojattuihin tiedostoihin"
+#~ msgid ""
+#~ "\n"
+#~ "# Bar lines, copied verbatim:\n"
+#~ msgstr ""
+#~ "\n"
+#~ "# Bar-rivit, kopiotu sellaisenaan:\n"
-#~ msgid "Need encryption key for \"%s\""
-#~ msgstr "Tarvitaan salausavain kohteelle %s "
+#~ msgid "Illegal starting char"
+#~ msgstr "Virheellinen aloitusmerkki"
-#~ msgid "writelines() requires list of strings"
-#~ msgstr "writelines()-komennolle pit antaa merkkijonolista"
+#~ msgid "# Value of 'encoding' when this file was written\n"
+#~ msgstr "# encoding-muuttujan arvo tiedostoa kirjoitettaessa\n"
-#~ msgid "E264: Python: Error initialising I/O objects"
-#~ msgstr "E264: Python: Virhe IO-olioiden alustuksessa"
+#~ msgid ""
+#~ "# You may edit it if you're careful!\n"
+#~ "\n"
+#~ msgstr ""
+#~ "# Muokkaa varovasti!\n"
+#~ "\n"
-#~ msgid "no such buffer"
-#~ msgstr "puskuria ei ole"
+#~ msgid "# This viminfo file was generated by Vim %s.\n"
+#~ msgstr "# Vimin %s generoima viminfo-tiedosto.\n"
-#~ msgid "attempt to refer to deleted window"
-#~ msgstr "yritettiin viitata poistettuun ikkunaan"
+#~ msgid "E138: Can't write viminfo file %s!"
+#~ msgstr "E138: Viminfo-tiedoston kirjoittaminen ei onnistu %s"
-#~ msgid "readonly attribute"
-#~ msgstr "kirjoitussuojattu attribuutti"
+#~ msgid "E929: Too many viminfo temp files, like %s!"
+#~ msgstr "E929: liikaa viminfo-väliaikaistiedostoja, kuten %s."
-#~ msgid "cursor position outside buffer"
-#~ msgstr "kursorin sijainti puskurin ulkopuolella"
+#~ msgid "E136: viminfo: Too many errors, skipping rest of file"
+#~ msgstr "E136: viminfo: liikaa virheitä, ohitetaan lopputiedosto"
-#~ msgid "<window object (deleted) at %p>"
-#~ msgstr "<ikkunaolio (poistettu) kohdassa %p>"
+#~ msgid "%sviminfo: %s in line: "
+#~ msgstr "%sviminfo: %s rivillä: "
-#~ msgid "<window object (unknown) at %p>"
-#~ msgstr "<ikkunaolio (tuntematon) kohdassa %p>"
+#~ msgid "E258: Unable to send to client"
+#~ msgstr "E258: Asiakkaalle lähetys ei onnistunut"
-#~ msgid "<window %d>"
-#~ msgstr "<ikkuna %d>"
+#~ msgid "E277: Unable to read a server reply"
+#~ msgstr "E277: Palvelimen vastauksen lukeminen ei onnistunut"
-#~ msgid "no such window"
-#~ msgstr "ikkunaa ei ole"
+#~ msgid "E240: No connection to Vim server"
+#~ msgstr "E240: Ei yhteyttä vim-palvelimeen"
-#~ msgid "attempt to refer to deleted buffer"
-#~ msgstr "yritettiin viitata poistettuun puskuriin"
+#~ msgid ""
+#~ "&OK\n"
+#~ "&Cancel"
+#~ msgstr ""
+#~ "&OK\n"
+#~ "&Peru"
+
+#~ msgid ""
+#~ "\n"
+#~ "# global variables:\n"
+#~ msgstr ""
+#~ "\n"
+#~ "# globaalit muuttujat:\n"
+
+#~ msgid "E729: using Funcref as a String"
+#~ msgstr "E729: Funcref ei käy merkkijonosta"
+
+#~ msgid "E914: Using a Channel as a Float"
+#~ msgstr "E914: Käytettiin Channelia Floattina"
+
+#~ msgid "E911: Using a Job as a Float"
+#~ msgstr "E911: Job ei käy Floatista"
+
+#~ msgid "E913: Using a Channel as a Number"
+#~ msgstr "E913: Channel ei käy Numberista"
+
+#~ msgid "E910: Using a Job as a Number"
+#~ msgstr "E910: Job ei käy Numberista"
+
+#~ msgid "E703: Using a Funcref as a Number"
+#~ msgstr "E703: Funcref ei käy Numberista"
+
+#~ msgid "E724: variable nested too deep for displaying"
+#~ msgstr "E724: muuttuja on upotettu liian syvälle näytettäväksi"
+
+#~ msgid "Patch file"
+#~ msgstr "Patch-tiedosto"
+
+#~ msgid "[crypted]"
+#~ msgstr "[salattu]"
+
+#~ msgid "Keys don't match!"
+#~ msgstr "Avaimet eivät täsmää!"
-# New Line eli uusi rivinvaihtomerkki (ei CR, LF tai CR LF)
-#~ msgid "[NL found]"
-#~ msgstr "[NL puuttuu]"
+#~ msgid "Enter same key again: "
+#~ msgstr "Anna sama avain uudestaan: "
-#~ msgid "Vim dialog..."
-#~ msgstr "Vim-ikkuna..."
+#~ msgid "Enter encryption key: "
+#~ msgstr "Anna salausavain: "
-#~ msgid "Font Selection"
-#~ msgstr "Fontin valinta"
+#~ msgid "Warning: Using a weak encryption method; see :help 'cm'"
+#~ msgstr "Varoitus: Käytetään heikkoa salausmenetelmää, ks. :help 'cm'"
-#~ msgid "E569: maximum number of cscope connections reached"
-#~ msgstr "E569: enimmismr cscope-yhteyksi otettu"
+#~ msgid "E821: File is encrypted with unknown method"
+#~ msgstr "E821: Tiedoston salaus on tuntematon"
+
+#~ msgid "E918: buffer must be loaded: %s"
+#~ msgstr "E918: puskuria ei voi ladata: %s"
+
+#~ msgid "E915: in_io buffer requires in_buf or in_name to be set"
+#~ msgstr "E915: in_io-puskurilla pitää olla in_buf tai in_name asetettu"
-#~ msgid "-name <name>\t\tUse resource as if vim was <name>"
-#~ msgstr "-name <nimi>\t\tKyt resurssia vim <nimen>"
+#~ msgid "E920: _io file requires _name to be set"
+#~ msgstr "E920: _io-tiedostolla pitää olla _name asetettu"
-#~ msgid "\t\t\t (Unimplemented)\n"
-#~ msgstr "\t\t\t (toteuttamatta)\n"
+#~ msgid "E906: not an open channel"
+#~ msgstr "E906: ei ole avoin kanava"
+
+#~ msgid ""
+#~ "E912: cannot use ch_evalexpr()/ch_sendexpr() with a raw or nl channel"
+#~ msgstr ""
+#~ "E912: ei voida käyttää funktioita ch_evalexpr(), ch_sendexpr() raa'an tai "
+#~ "nl-kanavan kanssa"
-#~ msgid "E290: over-the-spot style requires fontset"
-#~ msgstr "E290: over-the-spot-tyyliss pit olla fontset"
+#~ msgid "E917: Cannot use a callback with %s()"
+#~ msgstr "E917: Ei voitu käyttää callbackia %s()"
-#~ msgid "E291: Your GTK+ is older than 1.2.3. Status area disabled"
-#~ msgstr "E291: GTK+-versio vanhempi kuin 1.2.3: Tila-alue poistettu kytst"
+#~ msgid ""
+#~ "\n"
+#~ "# Buffer list:\n"
+#~ msgstr ""
+#~ "\n"
+#~ "# Puskuriluettelo:\n"
-#~ msgid "E292: Input Method Server is not running"
-#~ msgstr "E292: Sytemetodipalvelin ei ole kynniss"
+#~ msgid "E931: Buffer cannot be registered"
+#~ msgstr "E931: Puskuria ei voi rekisteröidä"
-#~ msgid "E396: containedin argument not accepted here"
-#~ msgstr "E396: containedin ei sovi thn"
+#~ msgid "E819: Blowfish test failed"
+#~ msgstr "E819: Blowfish-testi epäonnistui"
-#~ msgid "with GTK-GNOME GUI."
-#~ msgstr "GTK-Gnome-GUIlla."
+#~ msgid "E818: sha256 test failed"
+#~ msgstr "E818: sha256-testi epäonnistui failed"
-#~ msgid "with GTK GUI."
-#~ msgstr "GTK-GUIlla."
+#~ msgid "E817: Blowfish big/little endian use wrong"
+#~ msgstr "E817: Blowfishin tavujärjestys väärä"
-#~ msgid "-V[N]\t\tVerbose level"
-#~ msgstr "-V[N]\t\tMonisanaisuustaso"
+#~ msgid "E820: sizeof(uint32_t) != 4"
+#~ msgstr "E820: sizeof(uint32_t) != 4"
-#~ msgid "...(truncated)"
-#~ msgstr "...(katkaistu)"
+#~ msgid "E831: bf_key_init() called with empty password"
+#~ msgstr "E831: bf_key_init() tyhjällä salasanalla"
diff --git a/src/nvim/po/uk.po b/src/nvim/po/uk.po
index cff140508b..2c203f808f 100644
--- a/src/nvim/po/uk.po
+++ b/src/nvim/po/uk.po
@@ -82,7 +82,7 @@ msgid "Key length is too high"
msgstr "Довжина ключа завелика"
#, c-format
-msgid "Key \"%s\" doesn't exist"
+msgid "Key does not exist: %s"
msgstr "Ключ «%s» не існує"
msgid "Empty option name"
@@ -3719,7 +3719,7 @@ msgid "Calling shell to execute: \"%s\""
msgstr "Викликається оболонка щоб виконати: «%s»"
#, c-format
-msgid "Invalid channel \"%<PRIu64>\""
+msgid "Invalid channel: %<PRIu64>"
msgstr "Некоректний канал «%<PRIu64>»"
msgid "Message is not an array"
@@ -3734,7 +3734,7 @@ msgstr "Повідомлення має бути цілим числом"
msgid "Unknown message type"
msgstr "Невідомий тип повідомлення"
-msgid "Request array size should be 4 (request) or 3 (notification)"
+msgid "Request array size must be 4 (request) or 3 (notification)"
msgstr "Розмір масиву запиту має бути 4 (запит) чи 3 (повідомлення)"
msgid "ID must be a positive integer"
diff --git a/src/nvim/popupmnu.c b/src/nvim/popupmnu.c
index 6346951c05..6e81c5a171 100644
--- a/src/nvim/popupmnu.c
+++ b/src/nvim/popupmnu.c
@@ -1,3 +1,6 @@
+// This is an open source non-commercial project. Dear PVS-Studio, please check
+// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
+
/// @file popupmnu.c
///
/// Popup menu (PUM)
diff --git a/src/nvim/profile.c b/src/nvim/profile.c
index 97d7d77359..8fb8e92add 100644
--- a/src/nvim/profile.c
+++ b/src/nvim/profile.c
@@ -1,3 +1,6 @@
+// This is an open source non-commercial project. Dear PVS-Studio, please check
+// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
+
#include <stdio.h>
#include <math.h>
#include <assert.h>
diff --git a/src/nvim/quickfix.c b/src/nvim/quickfix.c
index 4fa5c85abd..112498ae20 100644
--- a/src/nvim/quickfix.c
+++ b/src/nvim/quickfix.c
@@ -1,3 +1,6 @@
+// This is an open source non-commercial project. Dear PVS-Studio, please check
+// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
+
/*
* quickfix.c: functions for quickfix mode, using a file with error messages
*/
@@ -856,7 +859,7 @@ restofline:
if (fmt_ptr == NULL) {
qi->qf_multiline = qi->qf_multiignore = false;
}
- } else if (fmt_ptr != NULL) {
+ } else {
// honor %> item
if (fmt_ptr->conthere) {
fmt_start = fmt_ptr;
@@ -984,7 +987,7 @@ qf_init_ext(
}
// Use the local value of 'errorformat' if it's set.
- if (errorformat == p_efm && tv == NULL && *buf->b_p_efm != NUL) {
+ if (errorformat == p_efm && tv == NULL && buf && *buf->b_p_efm != NUL) {
efm = buf->b_p_efm;
} else {
efm = errorformat;
@@ -3284,7 +3287,6 @@ void ex_cc(exarg_T *eap)
|| eap->cmdidx == CMD_lrewind
|| eap->cmdidx == CMD_lfirst
|| eap->cmdidx == CMD_llast
- || eap->cmdidx == CMD_llast
|| eap->cmdidx == CMD_ldo
|| eap->cmdidx == CMD_lfdo) {
qi = GET_LOC_LIST(curwin);
@@ -3341,7 +3343,6 @@ void ex_cnext(exarg_T *eap)
|| eap->cmdidx == CMD_lnfile
|| eap->cmdidx == CMD_lNfile
|| eap->cmdidx == CMD_lpfile
- || eap->cmdidx == CMD_lpfile
|| eap->cmdidx == CMD_ldo
|| eap->cmdidx == CMD_lfdo) {
qi = GET_LOC_LIST(curwin);
diff --git a/src/nvim/rbuffer.c b/src/nvim/rbuffer.c
index 111af0d0fb..18d453cbe9 100644
--- a/src/nvim/rbuffer.c
+++ b/src/nvim/rbuffer.c
@@ -1,3 +1,6 @@
+// This is an open source non-commercial project. Dear PVS-Studio, please check
+// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
+
#include <assert.h>
#include <stddef.h>
#include <string.h>
diff --git a/src/nvim/regexp.c b/src/nvim/regexp.c
index 9baa53d2a2..7a00ee27bb 100644
--- a/src/nvim/regexp.c
+++ b/src/nvim/regexp.c
@@ -1,3 +1,6 @@
+// This is an open source non-commercial project. Dear PVS-Studio, please check
+// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
+
/*
* Handling of regular expressions: vim_regcomp(), vim_regexec(), vim_regsub()
*
@@ -2350,7 +2353,7 @@ collection:
break;
case CLASS_LOWER:
for (cu = 1; cu <= 255; cu++) {
- if (vim_islower(cu) && cu != 170 && cu != 186) {
+ if (mb_islower(cu) && cu != 170 && cu != 186) {
regmbc(cu);
}
}
@@ -2376,7 +2379,7 @@ collection:
break;
case CLASS_UPPER:
for (cu = 1; cu <= 255; cu++) {
- if (vim_isupper(cu)) {
+ if (mb_isupper(cu)) {
regmbc(cu);
}
}
@@ -2398,7 +2401,7 @@ collection:
regc('\b');
break;
case CLASS_ESCAPE:
- regc('\033');
+ regc(ESC);
break;
}
} else {
@@ -2923,13 +2926,8 @@ static void skipchr(void)
else
prevchr_len = 0;
if (regparse[prevchr_len] != NUL) {
- if (enc_utf8)
- /* exclude composing chars that mb_ptr2len does include */
- prevchr_len += utf_ptr2len(regparse + prevchr_len);
- else if (has_mbyte)
- prevchr_len += (*mb_ptr2len)(regparse + prevchr_len);
- else
- ++prevchr_len;
+ // Exclude composing chars that utfc_ptr2len does include.
+ prevchr_len += utf_ptr2len(regparse + prevchr_len);
}
regparse += prevchr_len;
prev_at_start = at_start;
@@ -3052,7 +3050,7 @@ static int getoctchrs(void)
int c;
int i;
- for (i = 0; i < 3 && nr < 040; ++i) {
+ for (i = 0; i < 3 && nr < 040; i++) { // -V536
c = regparse[0];
if (c < '0' || c > '7')
break;
@@ -3474,7 +3472,7 @@ static long bt_regexec_both(char_u *line,
|| (ireg_ic
&& (((enc_utf8 && utf_fold(prog->regstart) == utf_fold(c)))
|| (c < 255 && prog->regstart < 255
- && vim_tolower(prog->regstart) == vim_tolower(c))))) {
+ && mb_tolower(prog->regstart) == mb_tolower(c))))) {
retval = regtry(prog, col);
} else {
retval = 0;
@@ -4155,7 +4153,7 @@ regmatch (
if (*opnd != *reginput
&& (!ireg_ic
|| (!enc_utf8
- && vim_tolower(*opnd) != vim_tolower(*reginput)))) {
+ && mb_tolower(*opnd) != mb_tolower(*reginput)))) {
status = RA_NOMATCH;
} else if (*opnd == NUL) {
// match empty string always works; happens when "~" is
@@ -4573,12 +4571,14 @@ regmatch (
if (OP(next) == EXACTLY) {
rst.nextb = *OPERAND(next);
if (ireg_ic) {
- if (vim_isupper(rst.nextb))
- rst.nextb_ic = vim_tolower(rst.nextb);
- else
- rst.nextb_ic = vim_toupper(rst.nextb);
- } else
+ if (mb_isupper(rst.nextb)) {
+ rst.nextb_ic = mb_tolower(rst.nextb);
+ } else {
+ rst.nextb_ic = mb_toupper(rst.nextb);
+ }
+ } else {
rst.nextb_ic = rst.nextb;
+ }
} else {
rst.nextb = NUL;
rst.nextb_ic = NUL;
@@ -5339,8 +5339,8 @@ do_class:
* would have been used for it. It does handle single-byte
* characters, such as latin1. */
if (ireg_ic) {
- cu = vim_toupper(*opnd);
- cl = vim_tolower(*opnd);
+ cu = mb_toupper(*opnd);
+ cl = mb_tolower(*opnd);
while (count < maxcount && (*scan == cu || *scan == cl)) {
count++;
scan++;
@@ -6312,14 +6312,15 @@ static char_u *cstrchr(char_u *s, int c)
/* tolower() and toupper() can be slow, comparing twice should be a lot
* faster (esp. when using MS Visual C++!).
* For UTF-8 need to use folded case. */
- if (enc_utf8 && c > 0x80)
+ if (c > 0x80) {
cc = utf_fold(c);
- else if (vim_isupper(c))
- cc = vim_tolower(c);
- else if (vim_islower(c))
- cc = vim_toupper(c);
- else
+ } else if (mb_isupper(c)) {
+ cc = mb_tolower(c);
+ } else if (mb_islower(c)) {
+ cc = mb_toupper(c);
+ } else {
return vim_strchr(s, c);
+ }
if (has_mbyte) {
for (p = s; *p != NUL; p += (*mb_ptr2len)(p)) {
@@ -6348,28 +6349,28 @@ static char_u *cstrchr(char_u *s, int c)
static fptr_T do_upper(int *d, int c)
{
- *d = vim_toupper(c);
+ *d = mb_toupper(c);
return (fptr_T)NULL;
}
static fptr_T do_Upper(int *d, int c)
{
- *d = vim_toupper(c);
+ *d = mb_toupper(c);
return (fptr_T)do_Upper;
}
static fptr_T do_lower(int *d, int c)
{
- *d = vim_tolower(c);
+ *d = mb_tolower(c);
return (fptr_T)NULL;
}
static fptr_T do_Lower(int *d, int c)
{
- *d = vim_tolower(c);
+ *d = mb_tolower(c);
return (fptr_T)do_Lower;
}
diff --git a/src/nvim/regexp_nfa.c b/src/nvim/regexp_nfa.c
index 5b49ab38f0..139772d51e 100644
--- a/src/nvim/regexp_nfa.c
+++ b/src/nvim/regexp_nfa.c
@@ -1,3 +1,6 @@
+// This is an open source non-commercial project. Dear PVS-Studio, please check
+// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
+
/*
* NFA regular expression implementation.
*
@@ -2772,15 +2775,10 @@ static int nfa_max_width(nfa_state_T *startstate, int depth)
case NFA_ANY:
case NFA_START_COLL:
case NFA_START_NEG_COLL:
- /* matches some character, including composing chars */
- if (enc_utf8)
- len += MB_MAXBYTES;
- else if (has_mbyte)
- len += 2;
- else
- ++len;
+ // Matches some character, including composing chars.
+ len += MB_MAXBYTES;
if (state->c != NFA_ANY) {
- /* skip over the characters */
+ // Skip over the characters.
state = state->out1->out;
continue;
}
@@ -4373,7 +4371,7 @@ static int check_char_class(int class, int c)
return OK;
break;
case NFA_CLASS_LOWER:
- if (vim_islower(c) && c != 170 && c != 186) {
+ if (mb_islower(c) && c != 170 && c != 186) {
return OK;
}
break;
@@ -4391,8 +4389,9 @@ static int check_char_class(int class, int c)
return OK;
break;
case NFA_CLASS_UPPER:
- if (vim_isupper(c))
+ if (mb_isupper(c)) {
return OK;
+ }
break;
case NFA_CLASS_XDIGIT:
if (ascii_isxdigit(c))
@@ -4411,8 +4410,9 @@ static int check_char_class(int class, int c)
return OK;
break;
case NFA_CLASS_ESCAPE:
- if (c == '\033')
+ if (c == ESC) {
return OK;
+ }
break;
default:
@@ -4892,7 +4892,7 @@ static long find_match_text(colnr_T startcol, int regstart, char_u *match_text)
int c2_len = PTR2LEN(s2);
int c2 = PTR2CHAR(s2);
- if ((c1 != c2 && (!ireg_ic || vim_tolower(c1) != vim_tolower(c2)))
+ if ((c1 != c2 && (!ireg_ic || mb_tolower(c1) != mb_tolower(c2)))
|| c1_len != c2_len) {
match = false;
break;
@@ -5585,22 +5585,24 @@ static int nfa_regmatch(nfa_regprog_T *prog, nfa_state_T *start,
break;
}
if (ireg_ic) {
- int curc_low = vim_tolower(curc);
- int done = FALSE;
+ int curc_low = mb_tolower(curc);
+ int done = false;
- for (; c1 <= c2; ++c1)
- if (vim_tolower(c1) == curc_low) {
+ for (; c1 <= c2; c1++) {
+ if (mb_tolower(c1) == curc_low) {
result = result_if_matched;
done = TRUE;
break;
}
- if (done)
+ }
+ if (done) {
break;
+ }
}
} else if (state->c < 0 ? check_char_class(state->c, curc)
: (curc == state->c
- || (ireg_ic && vim_tolower(curc)
- == vim_tolower(state->c)))) {
+ || (ireg_ic && mb_tolower(curc)
+ == mb_tolower(state->c)))) {
result = result_if_matched;
break;
}
@@ -6003,8 +6005,9 @@ static int nfa_regmatch(nfa_regprog_T *prog, nfa_state_T *start,
#endif
result = (c == curc);
- if (!result && ireg_ic)
- result = vim_tolower(c) == vim_tolower(curc);
+ if (!result && ireg_ic) {
+ result = mb_tolower(c) == mb_tolower(curc);
+ }
// If ireg_icombine is not set only skip over the character
// itself. When it is set skip over composing characters.
@@ -6152,8 +6155,8 @@ static int nfa_regmatch(nfa_regprog_T *prog, nfa_state_T *start,
// Checking if the required start character matches is
// cheaper than adding a state that won't match.
c = PTR2CHAR(reginput + clen);
- if (c != prog->regstart && (!ireg_ic || vim_tolower(c)
- != vim_tolower(prog->regstart))) {
+ if (c != prog->regstart && (!ireg_ic || mb_tolower(c)
+ != mb_tolower(prog->regstart))) {
#ifdef REGEXP_DEBUG
fprintf(log_fd,
" Skipping start state, regstart does not match\n");
diff --git a/src/nvim/screen.c b/src/nvim/screen.c
index cf460adb82..10dc86d5fa 100644
--- a/src/nvim/screen.c
+++ b/src/nvim/screen.c
@@ -1,3 +1,6 @@
+// This is an open source non-commercial project. Dear PVS-Studio, please check
+// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
+
/*
* screen.c: code for displaying on the screen
*
@@ -102,6 +105,7 @@
#include "nvim/indent.h"
#include "nvim/getchar.h"
#include "nvim/main.h"
+#include "nvim/mark.h"
#include "nvim/mbyte.h"
#include "nvim/memline.h"
#include "nvim/memory.h"
@@ -1015,14 +1019,10 @@ static void win_update(win_T *wp)
linenr_T from, to;
if (VIsual_active) {
- if (VIsual_active
- && (VIsual_mode != wp->w_old_visual_mode
- || type == INVERTED_ALL)) {
- /*
- * If the type of Visual selection changed, redraw the whole
- * selection. Also when the ownership of the X selection is
- * gained or lost.
- */
+ if (VIsual_mode != wp->w_old_visual_mode || type == INVERTED_ALL) {
+ // If the type of Visual selection changed, redraw the whole
+ // selection. Also when the ownership of the X selection is
+ // gained or lost.
if (curwin->w_cursor.lnum < VIsual.lnum) {
from = curwin->w_cursor.lnum;
to = VIsual.lnum;
@@ -1687,7 +1687,7 @@ static int compute_foldcolumn(win_T *wp, int col)
*/
static void fold_line(win_T *wp, long fold_count, foldinfo_T *foldinfo, linenr_T lnum, int row)
{
- char_u buf[51];
+ char_u buf[FOLD_TEXT_LEN];
pos_T *top, *bot;
linenr_T lnume = lnum + fold_count - 1;
int len;
@@ -2448,7 +2448,7 @@ win_line (
} else {
/* Long line, use only the last SPWORDLEN bytes. */
nextlinecol = v - SPWORDLEN;
- memmove(nextline, line + nextlinecol, SPWORDLEN);
+ memmove(nextline, line + nextlinecol, SPWORDLEN); // -V512
nextline_idx = SPWORDLEN + 1;
}
}
@@ -2580,13 +2580,14 @@ win_line (
* Do this for both search_hl and the match list.
*/
cur = wp->w_match_head;
- shl_flag = FALSE;
- while (cur != NULL || shl_flag == FALSE) {
- if (shl_flag == FALSE) {
+ shl_flag = false;
+ while (cur != NULL || !shl_flag) {
+ if (!shl_flag) {
shl = &search_hl;
- shl_flag = TRUE;
- } else
- shl = &cur->hl;
+ shl_flag = true;
+ } else {
+ shl = &cur->hl; // -V595
+ }
shl->startcol = MAXCOL;
shl->endcol = MAXCOL;
shl->attr_cur = 0;
@@ -2784,8 +2785,8 @@ win_line (
// draw 'breakindent': indent wrapped text accodringly
if (draw_state == WL_BRI - 1 && n_extra == 0) {
draw_state = WL_BRI;
- if (wp->w_p_bri && n_extra == 0 && row != startrow && filler_lines == 0) {
- char_attr = 0; // was: hl_attr(HLF_AT);
+ if (wp->w_p_bri && row != startrow && filler_lines == 0) {
+ char_attr = 0; // was: hl_attr(HLF_AT);
if (diff_hlf != (hlf_T)0) {
char_attr = hl_attr(diff_hlf);
@@ -3409,7 +3410,7 @@ win_line (
|| (c == ' ' && lcs_space && ptr - line <= trailcol))) {
c = (c == ' ') ? lcs_space : lcs_nbsp;
n_attr = 1;
- extra_attr = hl_attr(HLF_8);
+ extra_attr = hl_attr(HLF_0);
saved_attr2 = char_attr; // save current attr
mb_c = c;
if (enc_utf8 && (*mb_char2len)(c) > 1) {
@@ -3424,7 +3425,7 @@ win_line (
if (trailcol != MAXCOL && ptr > line + trailcol && c == ' ') {
c = lcs_trail;
n_attr = 1;
- extra_attr = hl_attr(HLF_8);
+ extra_attr = hl_attr(HLF_0);
saved_attr2 = char_attr; // save current attr
mb_c = c;
if (enc_utf8 && (*mb_char2len)(c) > 1) {
@@ -3525,8 +3526,8 @@ win_line (
c_extra = lcs_tab2;
}
n_attr = tab_len + 1;
- extra_attr = hl_attr(HLF_8);
- saved_attr2 = char_attr; /* save current attr */
+ extra_attr = hl_attr(HLF_0);
+ saved_attr2 = char_attr; // save current attr
mb_c = c;
if (enc_utf8 && (*mb_char2len)(c) > 1) {
mb_utf8 = TRUE;
@@ -5330,43 +5331,39 @@ void screen_puts_len(char_u *text, int textlen, int row, int col, int attr)
c = *ptr;
/* check if this is the first byte of a multibyte */
if (l_has_mbyte) {
- if (l_enc_utf8 && len > 0)
+ if (len > 0) {
mbyte_blen = utfc_ptr2len_len(ptr, (int)((text + len) - ptr));
- else
- mbyte_blen = (*mb_ptr2len)(ptr);
- if (l_enc_dbcs == DBCS_JPNU && c == 0x8e)
- mbyte_cells = 1;
- else if (l_enc_dbcs != 0)
- mbyte_cells = mbyte_blen;
- else { /* enc_utf8 */
- if (len >= 0)
- u8c = utfc_ptr2char_len(ptr, u8cc,
- (int)((text + len) - ptr));
- else
- u8c = utfc_ptr2char(ptr, u8cc);
- mbyte_cells = utf_char2cells(u8c);
- if (p_arshape && !p_tbidi && arabic_char(u8c)) {
- /* Do Arabic shaping. */
- if (len >= 0 && (int)(ptr - text) + mbyte_blen >= len) {
- /* Past end of string to be displayed. */
- nc = NUL;
- nc1 = NUL;
- } else {
- nc = utfc_ptr2char_len(ptr + mbyte_blen, pcc,
- (int)((text + len) - ptr - mbyte_blen));
- nc1 = pcc[0];
- }
- pc = prev_c;
- prev_c = u8c;
- u8c = arabic_shape(u8c, &c, &u8cc[0], nc, nc1, pc);
- } else
- prev_c = u8c;
- if (col + mbyte_cells > screen_Columns) {
- /* Only 1 cell left, but character requires 2 cells:
- * display a '>' in the last column to avoid wrapping. */
- c = '>';
- mbyte_cells = 1;
+ } else {
+ mbyte_blen = utfc_ptr2len(ptr);
+ }
+ if (len >= 0) {
+ u8c = utfc_ptr2char_len(ptr, u8cc, (int)((text + len) - ptr));
+ } else {
+ u8c = utfc_ptr2char(ptr, u8cc);
+ }
+ mbyte_cells = utf_char2cells(u8c);
+ if (p_arshape && !p_tbidi && arabic_char(u8c)) {
+ // Do Arabic shaping.
+ if (len >= 0 && (int)(ptr - text) + mbyte_blen >= len) {
+ // Past end of string to be displayed.
+ nc = NUL;
+ nc1 = NUL;
+ } else {
+ nc = utfc_ptr2char_len(ptr + mbyte_blen, pcc,
+ (int)((text + len) - ptr - mbyte_blen));
+ nc1 = pcc[0];
}
+ pc = prev_c;
+ prev_c = u8c;
+ u8c = arabic_shape(u8c, &c, &u8cc[0], nc, nc1, pc);
+ } else {
+ prev_c = u8c;
+ }
+ if (col + mbyte_cells > screen_Columns) {
+ // Only 1 cell left, but character requires 2 cells:
+ // display a '>' in the last column to avoid wrapping. */
+ c = '>';
+ mbyte_cells = 1;
}
}
@@ -5374,16 +5371,11 @@ void screen_puts_len(char_u *text, int textlen, int row, int col, int attr)
force_redraw_next = FALSE;
need_redraw = ScreenLines[off] != c
- || (mbyte_cells == 2
- && ScreenLines[off + 1] != (l_enc_dbcs ? ptr[1] : 0))
- || (l_enc_dbcs == DBCS_JPNU
- && c == 0x8e
- && ScreenLines2[off] != ptr[1])
- || (l_enc_utf8
- && (ScreenLinesUC[off] !=
- (u8char_T)(c < 0x80 && u8cc[0] == 0 ? 0 : u8c)
- || (ScreenLinesUC[off] != 0
- && screen_comp_differs(off, u8cc))))
+ || (mbyte_cells == 2 && ScreenLines[off + 1] != 0)
+ || (ScreenLinesUC[off] !=
+ (u8char_T)(c < 0x80 && u8cc[0] == 0 ? 0 : u8c)
+ || (ScreenLinesUC[off] != 0
+ && screen_comp_differs(off, u8cc)))
|| ScreenAttrs[off] != attr
|| exmode_active;
@@ -5537,13 +5529,14 @@ static void prepare_search_hl(win_T *wp, linenr_T lnum)
* Do this both for search_hl and the match list.
*/
cur = wp->w_match_head;
- shl_flag = FALSE;
- while (cur != NULL || shl_flag == FALSE) {
- if (shl_flag == FALSE) {
+ shl_flag = false;
+ while (cur != NULL || shl_flag == false) {
+ if (shl_flag == false) {
shl = &search_hl;
- shl_flag = TRUE;
- } else
- shl = &cur->hl;
+ shl_flag = true;
+ } else {
+ shl = &cur->hl; // -V595
+ }
if (shl->rm.regprog != NULL
&& shl->lnum == 0
&& re_multiline(shl->rm.regprog)) {
@@ -6102,8 +6095,7 @@ retry:
if (new_ScreenLinesC[i] == NULL)
break;
if (new_ScreenLines == NULL
- || (l_enc_utf8 && (new_ScreenLinesUC == NULL || i != p_mco))
- || (l_enc_dbcs == DBCS_JPNU && new_ScreenLines2 == NULL)
+ || (new_ScreenLinesUC == NULL || i != p_mco)
|| new_ScreenAttrs == NULL
|| new_LineOffset == NULL
|| new_LineWraps == NULL
@@ -6188,13 +6180,14 @@ retry:
ScreenLinesC[i] + LineOffset[old_row],
(size_t)len * sizeof(u8char_T));
}
- if (l_enc_dbcs == DBCS_JPNU && ScreenLines2 != NULL)
+ if (ScreenLines2 != NULL) {
memmove(new_ScreenLines2 + new_LineOffset[new_row],
- ScreenLines2 + LineOffset[old_row],
- (size_t)len * sizeof(schar_T));
+ ScreenLines2 + LineOffset[old_row],
+ (size_t)len * sizeof(schar_T));
+ }
memmove(new_ScreenAttrs + new_LineOffset[new_row],
- ScreenAttrs + LineOffset[old_row],
- (size_t)len * sizeof(sattr_T));
+ ScreenAttrs + LineOffset[old_row],
+ (size_t)len * sizeof(sattr_T));
}
}
}
diff --git a/src/nvim/screen.h b/src/nvim/screen.h
index 81a8b9ed4c..17515d4253 100644
--- a/src/nvim/screen.h
+++ b/src/nvim/screen.h
@@ -3,6 +3,10 @@
#include <stdbool.h>
+#include "nvim/types.h"
+#include "nvim/buffer_defs.h"
+#include "nvim/pos.h"
+
/*
* flags for update_screen()
* The higher the value, the higher the priority
diff --git a/src/nvim/search.c b/src/nvim/search.c
index c5c92b41c5..c662e3ba40 100644
--- a/src/nvim/search.c
+++ b/src/nvim/search.c
@@ -1,3 +1,6 @@
+// This is an open source non-commercial project. Dear PVS-Studio, please check
+// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
+
/*
* search.c: code for normal mode searching commands
*/
@@ -335,23 +338,26 @@ int pat_has_uppercase(char_u *pat)
while (*p != NUL) {
int l;
- if (has_mbyte && (l = (*mb_ptr2len)(p)) > 1) {
- if (enc_utf8 && utf_isupper(utf_ptr2char(p)))
- return TRUE;
+ if ((l = mb_ptr2len(p)) > 1) {
+ if (mb_isupper(utf_ptr2char(p))) {
+ return true;
+ }
p += l;
} else if (*p == '\\') {
- if (p[1] == '_' && p[2] != NUL) /* skip "\_X" */
+ if (p[1] == '_' && p[2] != NUL) { // skip "\_X"
p += 3;
- else if (p[1] == '%' && p[2] != NUL) /* skip "\%X" */
+ } else if (p[1] == '%' && p[2] != NUL) { // skip "\%X"
p += 3;
- else if (p[1] != NUL) /* skip "\X" */
+ } else if (p[1] != NUL) { // skip "\X"
p += 2;
- else
+ } else {
p += 1;
- } else if (vim_isupper(*p))
- return TRUE;
- else
- ++p;
+ }
+ } else if (mb_isupper(*p)) {
+ return true;
+ } else {
+ p++;
+ }
}
return FALSE;
}
diff --git a/src/nvim/search.h b/src/nvim/search.h
index d4e40cb287..cb50742990 100644
--- a/src/nvim/search.h
+++ b/src/nvim/search.h
@@ -4,6 +4,12 @@
#include <stdbool.h>
#include <stdint.h>
+#include "nvim/types.h"
+#include "nvim/buffer_defs.h"
+#include "nvim/eval/typval.h"
+#include "nvim/normal.h"
+#include "nvim/os/time.h"
+
/* Values for the find_pattern_in_path() function args 'type' and 'action': */
#define FIND_ANY 1
#define FIND_DEFINE 2
diff --git a/src/nvim/sha256.c b/src/nvim/sha256.c
index c72dafd08e..a2378cc202 100644
--- a/src/nvim/sha256.c
+++ b/src/nvim/sha256.c
@@ -1,3 +1,6 @@
+// This is an open source non-commercial project. Dear PVS-Studio, please check
+// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
+
/// @file sha256.c
///
/// FIPS-180-2 compliant SHA-256 implementation
diff --git a/src/nvim/shada.c b/src/nvim/shada.c
index f65fdaf1c0..a6d8cb6563 100644
--- a/src/nvim/shada.c
+++ b/src/nvim/shada.c
@@ -1,3 +1,6 @@
+// This is an open source non-commercial project. Dear PVS-Studio, please check
+// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
+
#include <stdlib.h>
#include <stddef.h>
#include <stdbool.h>
@@ -73,15 +76,10 @@ KHASH_SET_INIT_STR(strset)
(vim_rename((char_u *)a, (char_u *)b))
#define mb_strnicmp(a, b, c) \
(mb_strnicmp((char_u *)a, (char_u *)b, c))
-#define has_non_ascii(a) (has_non_ascii((char_u *)a))
-#define string_convert(a, b, c) \
- ((char *)string_convert((vimconv_T *)a, (char_u *)b, c))
#define path_shorten_fname_if_possible(b) \
((char *)path_shorten_fname_if_possible((char_u *)b))
#define buflist_new(ffname, sfname, ...) \
(buflist_new((char_u *)ffname, (char_u *)sfname, __VA_ARGS__))
-#define convert_setup(vcp, from, to) \
- (convert_setup(vcp, (char_u *)from, (char_u *)to))
#define os_isdir(f) (os_isdir((char_u *) f))
#define regtilde(s, m) ((char *) regtilde((char_u *) s, m))
#define path_tail_with_sep(f) ((char *) path_tail_with_sep((char_u *)f))
@@ -413,8 +411,6 @@ typedef struct sd_read_def {
const char *error; ///< Error message in case of error.
uintmax_t fpos; ///< Current position (amount of bytes read since
///< reader structure initialization). May overflow.
- vimconv_T sd_conv; ///< Structure used for converting encodings of some
- ///< items.
} ShaDaReadDef;
struct sd_write_def;
@@ -435,8 +431,6 @@ typedef struct sd_write_def {
ShaDaWriteCloser close; ///< Close function.
void *cookie; ///< Data describing object written to.
const char *error; ///< Error message in case of error.
- vimconv_T sd_conv; ///< Structure used for converting encodings of some
- ///< items.
} ShaDaWriteDef;
#ifdef INCLUDE_GENERATED_DECLARATIONS
@@ -803,7 +797,7 @@ static int open_shada_file_for_reading(const char *const fname,
return error;
}
- convert_setup(&sd_reader->sd_conv, "utf-8", p_enc);
+ assert(STRCMP(p_enc, "utf-8") == 0);
return 0;
}
@@ -811,7 +805,7 @@ static int open_shada_file_for_reading(const char *const fname,
/// Wrapper for closing file descriptors
static void close_file(void *cookie)
{
- const int error = file_free(cookie);
+ const int error = file_free(cookie, true);
if (error != 0) {
emsgf(_(SERR "System error while closing ShaDa file: %s"),
os_strerror(error));
@@ -1899,127 +1893,24 @@ shada_pack_entry_error:
}
#undef PACK_STRING
-/// Write single ShaDa entry, converting it if needed
+/// Write single ShaDa entry and free it afterwards
///
-/// @warning Frees entry after packing.
+/// Will not free if entry could not be freed.
///
/// @param[in] packer Packer used to write entry.
-/// @param[in] sd_conv Conversion definitions.
-/// @param[in] entry Entry written. If entry.can_free_entry is false then
-/// it assumes that entry was not converted, otherwise it
-/// is assumed that entry was already converted.
+/// @param[in] entry Entry written.
/// @param[in] max_kbyte Maximum size of an item in KiB. Zero means no
/// restrictions.
-static ShaDaWriteResult shada_pack_encoded_entry(msgpack_packer *const packer,
- const vimconv_T *const sd_conv,
- PossiblyFreedShadaEntry entry,
- const size_t max_kbyte)
- FUNC_ATTR_NONNULL_ALL
+static inline ShaDaWriteResult shada_pack_pfreed_entry(
+ msgpack_packer *const packer, PossiblyFreedShadaEntry entry,
+ const size_t max_kbyte)
+ FUNC_ATTR_NONNULL_ALL FUNC_ATTR_ALWAYS_INLINE
{
ShaDaWriteResult ret = kSDWriteSuccessfull;
+ ret = shada_pack_entry(packer, entry.data, max_kbyte);
if (entry.can_free_entry) {
- ret = shada_pack_entry(packer, entry.data, max_kbyte);
shada_free_shada_entry(&entry.data);
- return ret;
}
-#define RUN_WITH_CONVERTED_STRING(cstr, code) \
- do { \
- bool did_convert = false; \
- if (sd_conv->vc_type != CONV_NONE && has_non_ascii((cstr))) { \
- char *const converted_string = string_convert(sd_conv, (cstr), NULL); \
- if (converted_string != NULL) { \
- (cstr) = converted_string; \
- did_convert = true; \
- } \
- } \
- code \
- if (did_convert) { \
- xfree((cstr)); \
- } \
- } while (0)
- switch (entry.data.type) {
- case kSDItemUnknown:
- case kSDItemMissing: {
- assert(false);
- }
- case kSDItemSearchPattern: {
- RUN_WITH_CONVERTED_STRING(entry.data.data.search_pattern.pat, {
- ret = shada_pack_entry(packer, entry.data, max_kbyte);
- });
- break;
- }
- case kSDItemHistoryEntry: {
- RUN_WITH_CONVERTED_STRING(entry.data.data.history_item.string, {
- ret = shada_pack_entry(packer, entry.data, max_kbyte);
- });
- break;
- }
- case kSDItemSubString: {
- RUN_WITH_CONVERTED_STRING(entry.data.data.sub_string.sub, {
- ret = shada_pack_entry(packer, entry.data, max_kbyte);
- });
- break;
- }
- case kSDItemVariable: {
- if (sd_conv->vc_type != CONV_NONE) {
- typval_T tgttv;
- var_item_copy(sd_conv, &entry.data.data.global_var.value, &tgttv,
- true, 0);
- tv_clear(&entry.data.data.global_var.value);
- entry.data.data.global_var.value = tgttv;
- }
- ret = shada_pack_entry(packer, entry.data, max_kbyte);
- break;
- }
- case kSDItemRegister: {
- bool did_convert = false;
- if (sd_conv->vc_type != CONV_NONE) {
- size_t first_non_ascii = 0;
- for (size_t i = 0; i < entry.data.data.reg.contents_size; i++) {
- if (has_non_ascii(entry.data.data.reg.contents[i])) {
- first_non_ascii = i;
- did_convert = true;
- break;
- }
- }
- if (did_convert) {
- entry.data.data.reg.contents =
- xmemdup(entry.data.data.reg.contents,
- (entry.data.data.reg.contents_size
- * sizeof(entry.data.data.reg.contents[0])));
- for (size_t i = 0; i < entry.data.data.reg.contents_size; i++) {
- if (i >= first_non_ascii) {
- entry.data.data.reg.contents[i] = get_converted_string(
- sd_conv,
- entry.data.data.reg.contents[i],
- strlen(entry.data.data.reg.contents[i]));
- } else {
- entry.data.data.reg.contents[i] =
- xstrdup(entry.data.data.reg.contents[i]);
- }
- }
- }
- }
- ret = shada_pack_entry(packer, entry.data, max_kbyte);
- if (did_convert) {
- for (size_t i = 0; i < entry.data.data.reg.contents_size; i++) {
- xfree(entry.data.data.reg.contents[i]);
- }
- xfree(entry.data.data.reg.contents);
- }
- break;
- }
- case kSDItemHeader:
- case kSDItemGlobalMark:
- case kSDItemJump:
- case kSDItemBufferList:
- case kSDItemLocalMark:
- case kSDItemChange: {
- ret = shada_pack_entry(packer, entry.data, max_kbyte);
- break;
- }
- }
-#undef RUN_WITH_CONVERTED_STRING
return ret;
}
@@ -2556,11 +2447,7 @@ static ShaDaWriteResult shada_write(ShaDaWriteDef *const sd_writer,
break;
}
typval_T tgttv;
- if (sd_writer->sd_conv.vc_type != CONV_NONE) {
- var_item_copy(&sd_writer->sd_conv, &vartv, &tgttv, true, 0);
- } else {
- tv_copy(&vartv, &tgttv);
- }
+ tv_copy(&vartv, &tgttv);
ShaDaWriteResult spe_ret;
if ((spe_ret = shada_pack_entry(packer, (ShadaEntry) {
.type = kSDItemVariable,
@@ -2811,9 +2698,8 @@ static ShaDaWriteResult shada_write(ShaDaWriteDef *const sd_writer,
do { \
for (size_t i_ = 0; i_ < ARRAY_SIZE(wms_array); i_++) { \
if (wms_array[i_].data.type != kSDItemMissing) { \
- if (shada_pack_encoded_entry(packer, &sd_writer->sd_conv, \
- wms_array[i_], \
- max_kbyte) == kSDWriteFailed) { \
+ if (shada_pack_pfreed_entry(packer, wms_array[i_], max_kbyte) \
+ == kSDWriteFailed) { \
ret = kSDWriteFailed; \
goto shada_write_exit; \
} \
@@ -2823,8 +2709,8 @@ static ShaDaWriteResult shada_write(ShaDaWriteDef *const sd_writer,
PACK_WMS_ARRAY(wms->global_marks);
PACK_WMS_ARRAY(wms->registers);
for (size_t i = 0; i < wms->jumps_size; i++) {
- if (shada_pack_encoded_entry(packer, &sd_writer->sd_conv, wms->jumps[i],
- max_kbyte) == kSDWriteFailed) {
+ if (shada_pack_pfreed_entry(packer, wms->jumps[i], max_kbyte)
+ == kSDWriteFailed) {
ret = kSDWriteFailed;
goto shada_write_exit;
}
@@ -2832,8 +2718,8 @@ static ShaDaWriteResult shada_write(ShaDaWriteDef *const sd_writer,
#define PACK_WMS_ENTRY(wms_entry) \
do { \
if (wms_entry.data.type != kSDItemMissing) { \
- if (shada_pack_encoded_entry(packer, &sd_writer->sd_conv, wms_entry, \
- max_kbyte) == kSDWriteFailed) { \
+ if (shada_pack_pfreed_entry(packer, wms_entry, max_kbyte) \
+ == kSDWriteFailed) { \
ret = kSDWriteFailed; \
goto shada_write_exit; \
} \
@@ -2860,9 +2746,8 @@ static ShaDaWriteResult shada_write(ShaDaWriteDef *const sd_writer,
for (size_t i = 0; i < file_markss_to_dump; i++) {
PACK_WMS_ARRAY(all_file_markss[i]->marks);
for (size_t j = 0; j < all_file_markss[i]->changes_size; j++) {
- if (shada_pack_encoded_entry(packer, &sd_writer->sd_conv,
- all_file_markss[i]->changes[j],
- max_kbyte) == kSDWriteFailed) {
+ if (shada_pack_pfreed_entry(packer, all_file_markss[i]->changes[j],
+ max_kbyte) == kSDWriteFailed) {
ret = kSDWriteFailed;
goto shada_write_exit;
}
@@ -2886,8 +2771,8 @@ static ShaDaWriteResult shada_write(ShaDaWriteDef *const sd_writer,
if (dump_one_history[i]) {
hms_insert_whole_neovim_history(&wms->hms[i]);
HMS_ITER(&wms->hms[i], cur_entry, {
- if (shada_pack_encoded_entry(
- packer, &sd_writer->sd_conv, (PossiblyFreedShadaEntry) {
+ if (shada_pack_pfreed_entry(
+ packer, (PossiblyFreedShadaEntry) {
.data = cur_entry->data,
.can_free_entry = cur_entry->can_free_entry,
}, max_kbyte) == kSDWriteFailed) {
@@ -3038,8 +2923,6 @@ shada_write_file_nomerge: {}
verbose_leave();
}
- convert_setup(&sd_writer.sd_conv, p_enc, "utf-8");
-
const ShaDaWriteResult sw_ret = shada_write(&sd_writer, (nomerge
? NULL
: &sd_reader));
@@ -3327,29 +3210,6 @@ static ShaDaReadResult msgpack_read_uint64(ShaDaReadDef *const sd_reader,
return kSDReadStatusSuccess;
}
-/// Convert or copy and return a string
-///
-/// @param[in] sd_conv Conversion definition.
-/// @param[in] str String to convert.
-/// @param[in] len String length.
-///
-/// @return [allocated] converted string or copy of the original string.
-static inline char *get_converted_string(const vimconv_T *const sd_conv,
- const char *const str,
- const size_t len)
- FUNC_ATTR_NONNULL_ALL FUNC_ATTR_MALLOC FUNC_ATTR_WARN_UNUSED_RESULT
-{
- if (!has_non_ascii_len(str, len)) {
- return xmemdupz(str, len);
- }
- size_t new_len = len;
- char *const new_str = string_convert(sd_conv, str, &new_len);
- if (new_str == NULL) {
- return xmemdupz(str, len);
- }
- return new_str;
-}
-
#define READERR(entry_name, error_desc) \
RERR "Error while reading ShaDa file: " \
entry_name " entry at position %" PRIu64 " " \
@@ -3427,10 +3287,7 @@ static inline char *get_converted_string(const vimconv_T *const sd_conv,
sizeof(*unpacked.data.via.map.ptr)); \
ad_ga.ga_len++; \
}
-#define CONVERTED(str, len) ( \
- sd_reader->sd_conv.vc_type != CONV_NONE \
- ? get_converted_string(&sd_reader->sd_conv, (str), (len)) \
- : xmemdupz((str), (len)))
+#define CONVERTED(str, len) (xmemdupz((str), (len)))
#define BIN_CONVERTED(b) CONVERTED(b.ptr, b.size)
#define SET_ADDITIONAL_DATA(tgt, name) \
do { \
@@ -3803,30 +3660,14 @@ shada_read_next_item_start:
(char) unpacked.data.via.array.ptr[2].via.u64;
}
size_t strsize;
- if (sd_reader->sd_conv.vc_type == CONV_NONE
- || !has_non_ascii_len(unpacked.data.via.array.ptr[1].via.bin.ptr,
- unpacked.data.via.array.ptr[1].via.bin.size)) {
-shada_read_next_item_hist_no_conv:
- strsize = (
- unpacked.data.via.array.ptr[1].via.bin.size
- + 1 // Zero byte
- + 1); // Separator character
- entry->data.history_item.string = xmalloc(strsize);
- memcpy(entry->data.history_item.string,
- unpacked.data.via.array.ptr[1].via.bin.ptr,
- unpacked.data.via.array.ptr[1].via.bin.size);
- } else {
- size_t len = unpacked.data.via.array.ptr[1].via.bin.size;
- char *const converted = string_convert(
- &sd_reader->sd_conv, unpacked.data.via.array.ptr[1].via.bin.ptr,
- &len);
- if (converted != NULL) {
- strsize = len + 2;
- entry->data.history_item.string = xrealloc(converted, strsize);
- } else {
- goto shada_read_next_item_hist_no_conv;
- }
- }
+ strsize = (
+ unpacked.data.via.array.ptr[1].via.bin.size
+ + 1 // Zero byte
+ + 1); // Separator character
+ entry->data.history_item.string = xmalloc(strsize);
+ memcpy(entry->data.history_item.string,
+ unpacked.data.via.array.ptr[1].via.bin.ptr,
+ unpacked.data.via.array.ptr[1].via.bin.size);
entry->data.history_item.string[strsize - 2] = 0;
entry->data.history_item.string[strsize - 1] =
entry->data.history_item.sep;
@@ -3859,16 +3700,6 @@ shada_read_next_item_hist_no_conv:
"be converted to the VimL value")), initial_fpos);
goto shada_read_next_item_error;
}
- if (sd_reader->sd_conv.vc_type != CONV_NONE) {
- typval_T tgttv;
- var_item_copy(&sd_reader->sd_conv,
- &entry->data.global_var.value,
- &tgttv,
- true,
- 0);
- tv_clear(&entry->data.global_var.value);
- entry->data.global_var.value = tgttv;
- }
SET_ADDITIONAL_ELEMENTS(unpacked.data.via.array, 2,
entry->data.global_var.additional_elements,
"variable");
diff --git a/src/nvim/spell.c b/src/nvim/spell.c
index d4f49bffb2..25ae562e65 100644
--- a/src/nvim/spell.c
+++ b/src/nvim/spell.c
@@ -1,3 +1,6 @@
+// This is an open source non-commercial project. Dear PVS-Studio, please check
+// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
+
// spell.c: code for spell checking
//
// See spellfile.c for the Vim spell file format.
@@ -92,6 +95,7 @@
#include "nvim/func_attr.h"
#include "nvim/getchar.h"
#include "nvim/hashtab.h"
+#include "nvim/mark.h"
#include "nvim/mbyte.h"
#include "nvim/memline.h"
#include "nvim/memory.h"
@@ -2526,8 +2530,7 @@ void clear_spell_chartab(spelltab_T *sp)
}
}
-// Init the chartab used for spelling. Only depends on 'encoding'.
-// Called once while starting up and when 'encoding' changes.
+// Init the chartab used for spelling. Called once while starting up.
// The default is to use isalpha(), but the spell file should define the word
// characters to make it possible that 'encoding' differs from the current
// locale. For utf-8 we don't use isalpha() but our own functions.
@@ -2537,36 +2540,17 @@ void init_spell_chartab(void)
did_set_spelltab = false;
clear_spell_chartab(&spelltab);
- if (enc_dbcs) {
- // DBCS: assume double-wide characters are word characters.
- for (i = 128; i <= 255; ++i)
- if (MB_BYTE2LEN(i) == 2)
- spelltab.st_isw[i] = true;
- } else if (enc_utf8) {
- for (i = 128; i < 256; ++i) {
- int f = utf_fold(i);
- int u = utf_toupper(i);
-
- spelltab.st_isu[i] = utf_isupper(i);
- spelltab.st_isw[i] = spelltab.st_isu[i] || utf_islower(i);
- // The folded/upper-cased value is different between latin1 and
- // utf8 for 0xb5, causing E763 for no good reason. Use the latin1
- // value for utf-8 to avoid this.
- spelltab.st_fold[i] = (f < 256) ? f : i;
- spelltab.st_upper[i] = (u < 256) ? u : i;
- }
- } else {
- // Rough guess: use locale-dependent library functions.
- for (i = 128; i < 256; ++i) {
- if (vim_isupper(i)) {
- spelltab.st_isw[i] = true;
- spelltab.st_isu[i] = true;
- spelltab.st_fold[i] = vim_tolower(i);
- } else if (vim_islower(i)) {
- spelltab.st_isw[i] = true;
- spelltab.st_upper[i] = vim_toupper(i);
- }
- }
+ for (i = 128; i < 256; i++) {
+ int f = utf_fold(i);
+ int u = mb_toupper(i);
+
+ spelltab.st_isu[i] = mb_isupper(i);
+ spelltab.st_isw[i] = spelltab.st_isu[i] || mb_islower(i);
+ // The folded/upper-cased value is different between latin1 and
+ // utf8 for 0xb5, causing E763 for no good reason. Use the latin1
+ // value for utf-8 to avoid this.
+ spelltab.st_fold[i] = (f < 256) ? f : i;
+ spelltab.st_upper[i] = (u < 256) ? u : i;
}
}
diff --git a/src/nvim/spell_defs.h b/src/nvim/spell_defs.h
index c54a7f5390..ddd54c724e 100644
--- a/src/nvim/spell_defs.h
+++ b/src/nvim/spell_defs.h
@@ -265,11 +265,11 @@ typedef struct trystate_S {
: (c) < \
256 ? (int)spelltab.st_fold[c] : (int)towlower(c))
-#define SPELL_TOUPPER(c) (enc_utf8 && (c) >= 128 ? utf_toupper(c) \
+#define SPELL_TOUPPER(c) (enc_utf8 && (c) >= 128 ? mb_toupper(c) \
: (c) < \
256 ? (int)spelltab.st_upper[c] : (int)towupper(c))
-#define SPELL_ISUPPER(c) (enc_utf8 && (c) >= 128 ? utf_isupper(c) \
+#define SPELL_ISUPPER(c) (enc_utf8 && (c) >= 128 ? mb_isupper(c) \
: (c) < 256 ? spelltab.st_isu[c] : iswupper(c))
// First language that is loaded, start of the linked list of loaded
diff --git a/src/nvim/spellfile.c b/src/nvim/spellfile.c
index 4d7ff558ad..d34d69b3a4 100644
--- a/src/nvim/spellfile.c
+++ b/src/nvim/spellfile.c
@@ -1,3 +1,6 @@
+// This is an open source non-commercial project. Dear PVS-Studio, please check
+// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
+
// spellfile.c: code for reading and writing spell files.
//
// See spell.c for information about spell checking.
@@ -223,7 +226,9 @@
// few bytes as possible, see offset2bytes())
#include <stdio.h>
+#include <stdint.h>
#include <wctype.h>
+#include <strings.h>
#include "nvim/vim.h"
#include "nvim/spell_defs.h"
@@ -266,7 +271,7 @@
#define SAL_REM_ACCENTS 4
#define VIMSPELLMAGIC "VIMspell" // string at start of Vim spell file
-#define VIMSPELLMAGICL 8
+#define VIMSPELLMAGICL (sizeof(VIMSPELLMAGIC) - 1)
#define VIMSPELLVERSION 50
// Section IDs. Only renumber them when VIMSPELLVERSION changes!
@@ -493,6 +498,64 @@ typedef struct spellinfo_S {
# include "spellfile.c.generated.h"
#endif
+/// Read n bytes from fd to buf, returning on errors
+///
+/// @param[out] buf Buffer to read to, must be at least n bytes long.
+/// @param[in] n Amount of bytes to read.
+/// @param fd FILE* to read from.
+/// @param exit_code Code to run before returning.
+///
+/// @return Allows to proceed if everything is OK, returns SP_TRUNCERROR if
+/// there are not enough bytes, returns SP_OTHERERROR if reading failed.
+#define SPELL_READ_BYTES(buf, n, fd, exit_code) \
+ do { \
+ const size_t n__SPRB = (n); \
+ FILE *const fd__SPRB = (fd); \
+ char *const buf__SPRB = (buf); \
+ const size_t read_bytes__SPRB = fread(buf__SPRB, 1, n__SPRB, fd__SPRB); \
+ if (read_bytes__SPRB != n__SPRB) { \
+ exit_code; \
+ return feof(fd__SPRB) ? SP_TRUNCERROR : SP_OTHERERROR; \
+ } \
+ } while (0)
+
+/// Like #SPELL_READ_BYTES, but also error out if NUL byte was read
+///
+/// @return Allows to proceed if everything is OK, returns SP_TRUNCERROR if
+/// there are not enough bytes, returns SP_OTHERERROR if reading failed,
+/// returns SP_FORMERROR if read out a NUL byte.
+#define SPELL_READ_NONNUL_BYTES(buf, n, fd, exit_code) \
+ do { \
+ const size_t n__SPRNB = (n); \
+ FILE *const fd__SPRNB = (fd); \
+ char *const buf__SPRNB = (buf); \
+ SPELL_READ_BYTES(buf__SPRNB, n__SPRNB, fd__SPRNB, exit_code); \
+ if (memchr(buf__SPRNB, NUL, (size_t)n__SPRNB)) { \
+ exit_code; \
+ return SP_FORMERROR; \
+ } \
+ } while (0)
+
+/// Check that spell file starts with a magic string
+///
+/// Does not check for version of the file.
+///
+/// @param fd File to check.
+///
+/// @return 0 in case of success, SP_TRUNCERROR if file contains not enough
+/// bytes, SP_FORMERROR if it does not match magic string and
+/// SP_OTHERERROR if reading file failed.
+static inline int spell_check_magic_string(FILE *const fd)
+ FUNC_ATTR_NONNULL_ALL FUNC_ATTR_WARN_UNUSED_RESULT FUNC_ATTR_ALWAYS_INLINE
+{
+ char buf[VIMSPELLMAGICL];
+ SPELL_READ_BYTES(buf, VIMSPELLMAGICL, fd, ;);
+ if (memcmp(buf, VIMSPELLMAGIC, VIMSPELLMAGICL) != 0) {
+ return SP_FORMERROR;
+ }
+ return 0;
+}
+
// Load one spell file and store the info into a slang_T.
//
// This is invoked in three ways:
@@ -513,9 +576,7 @@ spell_load_file (
)
{
FILE *fd;
- char_u buf[VIMSPELLMAGICL];
char_u *p;
- int i;
int n;
int len;
char_u *save_sourcing_name = sourcing_name;
@@ -557,11 +618,20 @@ spell_load_file (
sourcing_lnum = 0;
// <HEADER>: <fileID>
- for (i = 0; i < VIMSPELLMAGICL; ++i)
- buf[i] = getc(fd); // <fileID>
- if (STRNCMP(buf, VIMSPELLMAGIC, VIMSPELLMAGICL) != 0) {
- EMSG(_("E757: This does not look like a spell file"));
- goto endFAIL;
+ const int scms_ret = spell_check_magic_string(fd);
+ switch (scms_ret) {
+ case SP_FORMERROR:
+ case SP_TRUNCERROR: {
+ emsgf(_("E757: This does not look like a spell file"));
+ goto endFAIL;
+ }
+ case SP_OTHERERROR: {
+ emsgf(_("E5042: Failed to read spell file %s: %s"),
+ fname, strerror(ferror(fd)));
+ }
+ case 0: {
+ break;
+ }
}
c = getc(fd); // <versionnr>
if (c < VIMSPELLVERSION) {
@@ -934,12 +1004,10 @@ static char_u *read_cnt_string(FILE *fd, int cnt_bytes, int *cntp)
// Return SP_*ERROR flags.
static int read_region_section(FILE *fd, slang_T *lp, int len)
{
- int i;
-
- if (len > 16)
+ if (len > 16) {
return SP_FORMERROR;
- for (i = 0; i < len; ++i)
- lp->sl_regions[i] = getc(fd); // <regionname>
+ }
+ SPELL_READ_NONNUL_BYTES((char *)lp->sl_regions, (size_t)len, fd, ;);
lp->sl_regions[len] = NUL;
return 0;
}
@@ -982,35 +1050,30 @@ static int read_charflags_section(FILE *fd)
// Return SP_*ERROR flags.
static int read_prefcond_section(FILE *fd, slang_T *lp)
{
- int cnt;
- int i;
- int n;
- char_u *p;
- char_u buf[MAXWLEN + 1];
-
// <prefcondcnt> <prefcond> ...
- cnt = get2c(fd); // <prefcondcnt>
- if (cnt <= 0)
+ const int cnt = get2c(fd); // <prefcondcnt>
+ if (cnt <= 0) {
return SP_FORMERROR;
+ }
lp->sl_prefprog = xcalloc(cnt, sizeof(regprog_T *));
lp->sl_prefixcnt = cnt;
- for (i = 0; i < cnt; ++i) {
+ for (int i = 0; i < cnt; i++) {
// <prefcond> : <condlen> <condstr>
- n = getc(fd); // <condlen>
- if (n < 0 || n >= MAXWLEN)
+ const int n = getc(fd); // <condlen>
+ if (n < 0 || n >= MAXWLEN) {
return SP_FORMERROR;
+ }
// When <condlen> is zero we have an empty condition. Otherwise
// compile the regexp program used to check for the condition.
if (n > 0) {
- buf[0] = '^'; // always match at one position only
- p = buf + 1;
- while (n-- > 0)
- *p++ = getc(fd); // <condstr>
- *p = NUL;
- lp->sl_prefprog[i] = vim_regcomp(buf, RE_MAGIC + RE_STRING);
+ char buf[MAXWLEN + 1];
+ buf[0] = '^'; // always match at one position only
+ SPELL_READ_NONNUL_BYTES(buf + 1, (size_t)n, fd, ;);
+ buf[n + 1] = NUL;
+ lp->sl_prefprog[i] = vim_regcomp((char_u *)buf, RE_MAGIC | RE_STRING);
}
}
return 0;
@@ -1063,7 +1126,6 @@ static int read_rep_section(FILE *fd, garray_T *gap, int16_t *first)
// Return SP_*ERROR flags.
static int read_sal_section(FILE *fd, slang_T *slang)
{
- int i;
int cnt;
garray_T *gap;
salitem_T *smp;
@@ -1073,13 +1135,16 @@ static int read_sal_section(FILE *fd, slang_T *slang)
slang->sl_sofo = false;
- i = getc(fd); // <salflags>
- if (i & SAL_F0LLOWUP)
+ const int flags = getc(fd); // <salflags>
+ if (flags & SAL_F0LLOWUP) {
slang->sl_followup = true;
- if (i & SAL_COLLAPSE)
+ }
+ if (flags & SAL_COLLAPSE) {
slang->sl_collapse = true;
- if (i & SAL_REM_ACCENTS)
+ }
+ if (flags & SAL_REM_ACCENTS) {
slang->sl_rem_accents = true;
+ }
cnt = get2c(fd); // <salcount>
if (cnt < 0)
@@ -1099,7 +1164,8 @@ static int read_sal_section(FILE *fd, slang_T *slang)
smp->sm_lead = p;
// Read up to the first special char into sm_lead.
- for (i = 0; i < ccnt; ++i) {
+ int i = 0;
+ for (; i < ccnt; ++i) {
c = getc(fd); // <salfrom>
if (vim_strchr((char_u *)"0123456789(-<^$", c) != NULL)
break;
@@ -1125,11 +1191,17 @@ static int read_sal_section(FILE *fd, slang_T *slang)
// Any following chars go in sm_rules.
smp->sm_rules = p;
- if (i < ccnt)
+ if (i < ccnt) {
// store the char we got while checking for end of sm_lead
*p++ = c;
- for (++i; i < ccnt; ++i)
- *p++ = getc(fd); // <salfrom>
+ }
+ i++;
+ if (i < ccnt) {
+ SPELL_READ_NONNUL_BYTES( // <salfrom>
+ (char *)p, (size_t)(ccnt - i), fd, xfree(smp->sm_lead));
+ p += (ccnt - i);
+ i = ccnt;
+ }
*p++ = NUL;
// <saltolen> <salto>
@@ -1569,9 +1641,14 @@ spell_read_tree (
// The tree size was computed when writing the file, so that we can
// allocate it as one long block. <nodecount>
- int len = get4c(fd);
- if (len < 0)
+ long len = get4c(fd);
+ if (len < 0) {
return SP_TRUNCERROR;
+ }
+ if ((size_t)len >= SIZE_MAX / sizeof(int)) {
+ // Invalid length, multiply with sizeof(int) would overflow.
+ return SP_FORMERROR;
+ }
if (len > 0) {
// Allocate the byte array.
bp = xmalloc(len);
diff --git a/src/nvim/state.c b/src/nvim/state.c
index 44c6441e40..210708c3f4 100644
--- a/src/nvim/state.c
+++ b/src/nvim/state.c
@@ -1,3 +1,6 @@
+// This is an open source non-commercial project. Dear PVS-Studio, please check
+// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
+
#include <assert.h>
#include "nvim/lib/kvec.h"
diff --git a/src/nvim/strings.c b/src/nvim/strings.c
index 5dcffe00e0..743b43c2e5 100644
--- a/src/nvim/strings.c
+++ b/src/nvim/strings.c
@@ -1,3 +1,6 @@
+// This is an open source non-commercial project. Dear PVS-Studio, please check
+// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
+
#include <inttypes.h>
#include <stdarg.h>
#include <stdbool.h>
@@ -198,8 +201,16 @@ char_u *vim_strsave_shellescape(const char_u *string,
/* First count the number of extra bytes required. */
size_t length = STRLEN(string) + 3; // two quotes and a trailing NUL
for (const char_u *p = string; *p != NUL; mb_ptr_adv(p)) {
- if (*p == '\'')
- length += 3; /* ' => '\'' */
+#ifdef WIN32
+ if (!p_ssl) {
+ if (*p == '"') {
+ length++; // " -> ""
+ }
+ } else
+#endif
+ if (*p == '\'') {
+ length += 3; // ' => '\''
+ }
if ((*p == '\n' && (csh_like || do_newline))
|| (*p == '!' && (csh_like || do_special))) {
++length; /* insert backslash */
@@ -216,10 +227,25 @@ char_u *vim_strsave_shellescape(const char_u *string,
escaped_string = xmalloc(length);
d = escaped_string;
- /* add opening quote */
+ // add opening quote
+#ifdef WIN32
+ if (!p_ssl) {
+ *d++ = '"';
+ } else
+#endif
*d++ = '\'';
for (const char_u *p = string; *p != NUL; ) {
+#ifdef WIN32
+ if (!p_ssl) {
+ if (*p == '"') {
+ *d++ = '"';
+ *d++ = '"';
+ p++;
+ continue;
+ }
+ } else
+#endif
if (*p == '\'') {
*d++ = '\'';
*d++ = '\\';
@@ -246,7 +272,12 @@ char_u *vim_strsave_shellescape(const char_u *string,
MB_COPY_CHAR(p, d);
}
- /* add terminating quote and finish with a NUL */
+ // add terminating quote and finish with a NUL
+# ifdef WIN32
+ if (!p_ssl) {
+ *d++ = '"';
+ } else
+# endif
*d++ = '\'';
*d = NUL;
@@ -291,14 +322,15 @@ void vim_strup(char_u *p)
}
}
-/// Make given string all upper-case
+/// Make given string all upper-case or all lower-case
///
-/// Handels multi-byte characters as good as possible.
+/// Handles multi-byte characters as good as possible.
///
/// @param[in] orig Input string.
+/// @param[in] upper If true make uppercase, otherwise lowercase
///
/// @return [allocated] upper-cased string.
-char *strup_save(const char *const orig)
+char *strcase_save(const char *const orig, bool upper)
FUNC_ATTR_NONNULL_RET FUNC_ATTR_MALLOC FUNC_ATTR_NONNULL_ALL
{
char *res = xstrdup(orig);
@@ -307,33 +339,25 @@ char *strup_save(const char *const orig)
while (*p != NUL) {
int l;
- if (enc_utf8) {
- int c = utf_ptr2char((const char_u *)p);
- int uc = utf_toupper(c);
-
- // Reallocate string when byte count changes. This is rare,
- // thus it's OK to do another malloc()/free().
- l = utf_ptr2len((const char_u *)p);
- int newl = utf_char2len(uc);
- if (newl != l) {
- // TODO(philix): use xrealloc() in strup_save()
- char *s = xmalloc(STRLEN(res) + (size_t)(1 + newl - l));
- memcpy(s, res, (size_t)(p - res));
- STRCPY(s + (p - res) + newl, p + l);
- p = s + (p - res);
- xfree(res);
- res = s;
- }
-
- utf_char2bytes(uc, (char_u *)p);
- p += newl;
- } else if (has_mbyte && (l = (*mb_ptr2len)((const char_u *)p)) > 1) {
- p += l; // Skip multi-byte character.
- } else {
- // note that toupper() can be a macro
- *p = (char)(uint8_t)TOUPPER_LOC(*p);
- p++;
+ int c = utf_ptr2char((const char_u *)p);
+ int uc = upper ? mb_toupper(c) : mb_tolower(c);
+
+ // Reallocate string when byte count changes. This is rare,
+ // thus it's OK to do another malloc()/free().
+ l = utf_ptr2len((const char_u *)p);
+ int newl = utf_char2len(uc);
+ if (newl != l) {
+ // TODO(philix): use xrealloc() in strup_save()
+ char *s = xmalloc(STRLEN(res) + (size_t)(1 + newl - l));
+ memcpy(s, res, (size_t)(p - res));
+ STRCPY(s + (p - res) + newl, p + l);
+ p = s + (p - res);
+ xfree(res);
+ res = s;
}
+
+ utf_char2bytes(uc, (char_u *)p);
+ p += newl;
}
return res;
diff --git a/src/nvim/syntax.c b/src/nvim/syntax.c
index 4a7b4a0eac..ce48547163 100644
--- a/src/nvim/syntax.c
+++ b/src/nvim/syntax.c
@@ -1,3 +1,6 @@
+// This is an open source non-commercial project. Dear PVS-Studio, please check
+// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
+
/*
* syntax.c: code for syntax highlighting
*/
@@ -42,34 +45,38 @@
static bool did_syntax_onoff = false;
-// Structure that stores information about a highlight group.
-// The ID of a highlight group is also called group ID. It is the index in
-// the highlight_ga array PLUS ONE.
+/// Structure that stores information about a highlight group.
+/// The ID of a highlight group is also called group ID. It is the index in
+/// the highlight_ga array PLUS ONE.
struct hl_group {
- char_u *sg_name; // highlight group name
- char_u *sg_name_u; // uppercase of sg_name
- int sg_attr; // Screen attr
- int sg_link; // link to this highlight group ID
- int sg_set; // combination of SG_* flags
- scid_T sg_scriptID; // script in which the group was last set
+ char_u *sg_name; ///< highlight group name
+ char_u *sg_name_u; ///< uppercase of sg_name
+ int sg_attr; ///< Screen attr @see ATTR_ENTRY
+ int sg_link; ///< link to this highlight group ID
+ int sg_set; ///< combination of flags in \ref SG_SET
+ scid_T sg_scriptID; ///< script in which the group was last set
// for terminal UIs
- int sg_cterm; // "cterm=" highlighting attr
- int sg_cterm_fg; // terminal fg color number + 1
- int sg_cterm_bg; // terminal bg color number + 1
- int sg_cterm_bold; // bold attr was set for light color
+ int sg_cterm; ///< "cterm=" highlighting attr
+ int sg_cterm_fg; ///< terminal fg color number + 1
+ int sg_cterm_bg; ///< terminal bg color number + 1
+ int sg_cterm_bold; ///< bold attr was set for light color
// for RGB UIs
- int sg_gui; // "gui=" highlighting attributes
- RgbValue sg_rgb_fg; // RGB foreground color
- RgbValue sg_rgb_bg; // RGB background color
- RgbValue sg_rgb_sp; // RGB special color
- uint8_t *sg_rgb_fg_name; // RGB foreground color name
- uint8_t *sg_rgb_bg_name; // RGB background color name
- uint8_t *sg_rgb_sp_name; // RGB special color name
+ int sg_gui; ///< "gui=" highlighting attributes
+ ///< (combination of \ref HL_ATTRIBUTES)
+ RgbValue sg_rgb_fg; ///< RGB foreground color
+ RgbValue sg_rgb_bg; ///< RGB background color
+ RgbValue sg_rgb_sp; ///< RGB special color
+ uint8_t *sg_rgb_fg_name; ///< RGB foreground color name
+ uint8_t *sg_rgb_bg_name; ///< RGB background color name
+ uint8_t *sg_rgb_sp_name; ///< RGB special color name
};
+/// \addtogroup SG_SET
+/// @{
#define SG_CTERM 2 // cterm has been set
#define SG_GUI 4 // gui has been set
#define SG_LINK 8 // link has been set
+/// @}
// highlight groups for 'highlight' option
static garray_T highlight_ga = GA_EMPTY_INIT_VALUE;
@@ -4242,83 +4249,81 @@ static void syn_cmd_keyword(exarg_T *eap, int syncing)
if (rest != NULL) {
syn_id = syn_check_group(arg, (int)(group_name_end - arg));
- if (syn_id != 0)
- /* allocate a buffer, for removing backslashes in the keyword */
+ if (syn_id != 0) {
+ // Allocate a buffer, for removing backslashes in the keyword.
keyword_copy = xmalloc(STRLEN(rest) + 1);
- syn_opt_arg.flags = 0;
- syn_opt_arg.keyword = TRUE;
- syn_opt_arg.sync_idx = NULL;
- syn_opt_arg.has_cont_list = FALSE;
- syn_opt_arg.cont_in_list = NULL;
- syn_opt_arg.next_list = NULL;
-
- /*
- * The options given apply to ALL keywords, so all options must be
- * found before keywords can be created.
- * 1: collect the options and copy the keywords to keyword_copy.
- */
- cnt = 0;
- p = keyword_copy;
- for (; rest != NULL && !ends_excmd(*rest); rest = skipwhite(rest)) {
- rest = get_syn_options(rest, &syn_opt_arg, &conceal_char);
- if (rest == NULL || ends_excmd(*rest))
- break;
- /* Copy the keyword, removing backslashes, and add a NUL. */
- while (*rest != NUL && !ascii_iswhite(*rest)) {
- if (*rest == '\\' && rest[1] != NUL)
- ++rest;
- *p++ = *rest++;
- }
- *p++ = NUL;
- ++cnt;
}
+ if (keyword_copy != NULL) {
+ syn_opt_arg.flags = 0;
+ syn_opt_arg.keyword = true;
+ syn_opt_arg.sync_idx = NULL;
+ syn_opt_arg.has_cont_list = false;
+ syn_opt_arg.cont_in_list = NULL;
+ syn_opt_arg.next_list = NULL;
+
+ // The options given apply to ALL keywords, so all options must be
+ // found before keywords can be created.
+ // 1: collect the options and copy the keywords to keyword_copy.
+ cnt = 0;
+ p = keyword_copy;
+ for (; rest != NULL && !ends_excmd(*rest); rest = skipwhite(rest)) {
+ rest = get_syn_options(rest, &syn_opt_arg, &conceal_char);
+ if (rest == NULL || ends_excmd(*rest)) {
+ break;
+ }
+ // Copy the keyword, removing backslashes, and add a NUL.
+ while (*rest != NUL && !ascii_iswhite(*rest)) {
+ if (*rest == '\\' && rest[1] != NUL) {
+ rest++;
+ }
+ *p++ = *rest++;
+ }
+ *p++ = NUL;
+ cnt++;
+ }
- if (!eap->skip) {
- /* Adjust flags for use of ":syn include". */
- syn_incl_toplevel(syn_id, &syn_opt_arg.flags);
+ if (!eap->skip) {
+ // Adjust flags for use of ":syn include".
+ syn_incl_toplevel(syn_id, &syn_opt_arg.flags);
- /*
- * 2: Add an entry for each keyword.
- */
- for (kw = keyword_copy; --cnt >= 0; kw += STRLEN(kw) + 1) {
- for (p = vim_strchr(kw, '[');; ) {
- if (p != NULL)
- *p = NUL;
- add_keyword(kw, syn_id, syn_opt_arg.flags,
- syn_opt_arg.cont_in_list,
- syn_opt_arg.next_list, conceal_char);
- if (p == NULL)
- break;
- if (p[1] == NUL) {
- EMSG2(_("E789: Missing ']': %s"), kw);
- goto error;
- }
- if (p[1] == ']') {
- if (p[2] != NUL) {
- EMSG3(_("E890: trailing char after ']': %s]%s"),
- kw, &p[2]);
+ // 2: Add an entry for each keyword.
+ for (kw = keyword_copy; --cnt >= 0; kw += STRLEN(kw) + 1) {
+ for (p = vim_strchr(kw, '[');; ) {
+ if (p != NULL) {
+ *p = NUL;
+ }
+ add_keyword(kw, syn_id, syn_opt_arg.flags,
+ syn_opt_arg.cont_in_list,
+ syn_opt_arg.next_list, conceal_char);
+ if (p == NULL) {
+ break;
+ }
+ if (p[1] == NUL) {
+ emsgf(_("E789: Missing ']': %s"), kw);
goto error;
}
- kw = p + 1;
- break; // skip over the "]"
- }
- if (has_mbyte) {
- int l = (*mb_ptr2len)(p + 1);
+ if (p[1] == ']') {
+ if (p[2] != NUL) {
+ emsgf(_("E890: trailing char after ']': %s]%s"),
+ kw, &p[2]);
+ goto error;
+ }
+ kw = p + 1;
+ break; // skip over the "]"
+ }
+ const int l = (*mb_ptr2len)(p + 1);
memmove(p, p + 1, l);
p += l;
- } else {
- p[0] = p[1];
- ++p;
}
}
}
- }
error:
- xfree(keyword_copy);
- xfree(syn_opt_arg.cont_in_list);
- xfree(syn_opt_arg.next_list);
+ xfree(keyword_copy);
+ xfree(syn_opt_arg.cont_in_list);
+ xfree(syn_opt_arg.next_list);
+ }
}
if (rest != NULL)
@@ -5896,6 +5901,8 @@ static void syntime_report(void)
static char *highlight_init_both[] =
{
"Conceal ctermbg=DarkGrey ctermfg=LightGrey guibg=DarkGrey guifg=LightGrey",
+ "Cursor guibg=fg guifg=bg",
+ "lCursor guibg=fg guifg=bg",
"DiffText cterm=bold ctermbg=Red gui=bold guibg=Red",
"ErrorMsg ctermbg=DarkRed ctermfg=White guibg=Red guifg=White",
"IncSearch cterm=reverse gui=reverse",
@@ -5912,6 +5919,7 @@ static char *highlight_init_both[] =
"default link EndOfBuffer NonText",
"default link QuickFixLine Search",
"default link Substitute Search",
+ "default link Whitespace NonText",
NULL
};
@@ -6093,16 +6101,16 @@ int load_colors(char_u *name)
return retval;
}
-/*
- * Handle the ":highlight .." command.
- * When using ":hi clear" this is called recursively for each group with
- * "forceit" and "init" both TRUE.
- */
-void
-do_highlight (
+
+/// Handle the ":highlight .." command.
+/// When using ":hi clear" this is called recursively for each group with
+/// "forceit" and "init" both TRUE.
+/// @param init TRUE when called for initializing
+void
+do_highlight(
char_u *line,
int forceit,
- int init /* TRUE when called for initializing */
+ int init
)
{
char_u *name_end;
@@ -6704,12 +6712,10 @@ static garray_T attr_table = GA_EMPTY_INIT_VALUE;
#define ATTR_ENTRY(idx) ((attrentry_T *)attr_table.ga_data)[idx]
-/*
- * Return the attr number for a set of colors and font.
- * Add a new entry to the term_attr_table, attr_table or gui_attr_table
- * if the combination is new.
- * Return 0 for error.
- */
+/// Return the attr number for a set of colors and font.
+/// Add a new entry to the term_attr_table, attr_table or gui_attr_table
+/// if the combination is new.
+/// @return 0 for error.
int get_attr_entry(attrentry_T *aep)
{
garray_T *table = &attr_table;
@@ -6932,7 +6938,7 @@ static int highlight_list_arg(int id, int didh, int type, int iarg, char_u *sarg
/// Check whether highlight group has attribute
///
-/// @param[in] id Highilght group to check.
+/// @param[in] id Highlight group to check.
/// @param[in] flag Attribute to check.
/// @param[in] modec 'g' for GUI, 'c' for term.
///
@@ -7165,12 +7171,13 @@ int syn_namen2id(char_u *linep, int len)
return id;
}
-/*
- * Find highlight group name in the table and return it's ID.
- * The argument is a pointer to the name and the length of the name.
- * If it doesn't exist yet, a new entry is created.
- * Return 0 for failure.
- */
+/// Find highlight group name in the table and return it's ID.
+/// If it doesn't exist yet, a new entry is created.
+///
+/// @param pp Highlight group name
+/// @param len length of \p pp
+///
+/// @return 0 for failure else the id of the group
int syn_check_group(char_u *pp, int len)
{
char_u *name = vim_strnsave(pp, len);
@@ -8244,7 +8251,14 @@ color_name_table_T color_name_table[] = {
{ NULL, 0 },
};
-RgbValue name_to_color(uint8_t *name)
+
+/// Translate to RgbValue if \p name is an hex value (e.g. #XXXXXX),
+/// else look into color_name_table to translate a color name to its
+/// hex value
+///
+/// @param[in] name string value to convert to RGB
+/// return the hex value or -1 if could not find a correct value
+RgbValue name_to_color(const uint8_t *name)
{
if (name[0] == '#' && isxdigit(name[1]) && isxdigit(name[2])
diff --git a/src/nvim/syntax.h b/src/nvim/syntax.h
index af2ac719c6..bb733ead30 100644
--- a/src/nvim/syntax.h
+++ b/src/nvim/syntax.h
@@ -4,11 +4,12 @@
#include <stdbool.h>
#include "nvim/buffer_defs.h"
+#include "nvim/ex_cmds_defs.h"
-/*
- * Terminal highlighting attribute bits.
- * Attributes above HL_ALL are used for syntax highlighting.
- */
+/// Terminal highlighting attribute bits.
+/// Attributes above HL_ALL are used for syntax highlighting.
+/// \addtogroup HL_ATTRIBUTES
+/// @{
#define HL_NORMAL 0x00
#define HL_INVERSE 0x01
#define HL_BOLD 0x02
@@ -16,6 +17,7 @@
#define HL_UNDERLINE 0x08
#define HL_UNDERCURL 0x10
#define HL_STANDOUT 0x20
+/// @}
#define HL_CONTAINED 0x01 /* not used on toplevel */
#define HL_TRANSP 0x02 /* has no highlighting */
diff --git a/src/nvim/tag.c b/src/nvim/tag.c
index b812dd2ffd..b8b86bf979 100644
--- a/src/nvim/tag.c
+++ b/src/nvim/tag.c
@@ -1,3 +1,6 @@
+// This is an open source non-commercial project. Dear PVS-Studio, please check
+// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
+
/*
* Code to handle tags and the tag stack
*/
@@ -1222,9 +1225,9 @@ find_tags (
if (has_re && orgpat.regmatch.regprog == NULL)
goto findtag_end;
- /* This is only to avoid a compiler warning for using search_info
- * uninitialised. */
- memset(&search_info, 0, (size_t)1);
+ // This is only to avoid a compiler warning for using search_info
+ // uninitialised.
+ memset(&search_info, 0, 1); // -V512
/*
* When finding a specified number of matches, first try with matching
@@ -1847,14 +1850,14 @@ parse_line:
}
}
} else {
-#define TAG_SEP 0x01
+#define TAG_SEP 0x02
size_t tag_fname_len = STRLEN(tag_fname);
// Save the tag in a buffer.
- // Use 0x01 to separate fields (Can't use NUL, because the
+ // Use 0x02 to separate fields (Can't use NUL, because the
// hash key is terminated by NUL).
- // Emacs tag: <mtt><tag_fname><NUL><ebuf><NUL><lbuf>
- // other tag: <mtt><tag_fname><NUL><NUL><lbuf>
- // without Emacs tags: <mtt><tag_fname><NUL><lbuf>
+ // Emacs tag: <mtt><tag_fname><0x02><ebuf><0x02><lbuf><NUL>
+ // other tag: <mtt><tag_fname><0x02><0x02><lbuf><NUL>
+ // without Emacs tags: <mtt><tag_fname><0x02><lbuf><NUL>
// Here <mtt> is the "mtt" value plus 1 to avoid NUL.
len = (int)tag_fname_len + (int)STRLEN(lbuf) + 3;
mfp = xmalloc(sizeof(char_u) + len + 1);
@@ -2534,7 +2537,7 @@ jumpto_tag (
}
}
p_ws = save_p_ws;
- p_ic = save_p_ic;
+ p_ic = save_p_ic; // -V519
p_scs = save_p_scs;
/* A search command may have positioned the cursor beyond the end
@@ -2797,11 +2800,9 @@ add_tag_field (
return retval;
}
-/*
- * Add the tags matching the specified pattern to the list "list"
- * as a dictionary
- */
-int get_tags(list_T *list, char_u *pat)
+/// Add the tags matching the specified pattern "pat" to the list "list"
+/// as a dictionary. Use "buf_fname" for priority, unless NULL.
+int get_tags(list_T *list, char_u *pat, char_u *buf_fname)
{
int num_matches, i, ret;
char_u **matches, *p;
@@ -2811,7 +2812,7 @@ int get_tags(list_T *list, char_u *pat)
bool is_static;
ret = find_tags(pat, &num_matches, &matches,
- TAG_REGEXP | TAG_NOIC, (int)MAXCOL, NULL);
+ TAG_REGEXP | TAG_NOIC, (int)MAXCOL, buf_fname);
if (ret == OK && num_matches > 0) {
for (i = 0; i < num_matches; ++i) {
int parse_result = parse_match(matches[i], &tp);
diff --git a/src/nvim/terminal.c b/src/nvim/terminal.c
index 85c4950b42..c44fe15be5 100644
--- a/src/nvim/terminal.c
+++ b/src/nvim/terminal.c
@@ -1,3 +1,6 @@
+// This is an open source non-commercial project. Dear PVS-Studio, please check
+// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
+
// VT220/xterm-like terminal emulator.
// Powered by libvterm http://www.leonerd.org.uk/code/libvterm
//
@@ -630,13 +633,14 @@ static int term_movecursor(VTermPos new, VTermPos old, int visible,
static void buf_set_term_title(buf_T *buf, char *title)
FUNC_ATTR_NONNULL_ALL
{
- Error err;
+ Error err = ERROR_INIT;
dict_set_var(buf->b_vars,
STATIC_CSTR_AS_STRING("term_title"),
STRING_OBJ(cstr_as_string(title)),
false,
false,
&err);
+ api_clear_error(&err);
}
static int term_settermprop(VTermProp prop, VTermValue *val, void *data)
@@ -1217,12 +1221,14 @@ static bool is_focused(Terminal *term)
#define GET_CONFIG_VALUE(k, o) \
do { \
- Error err; \
+ Error err = ERROR_INIT; \
/* Only called from terminal_open where curbuf->terminal is the */ \
/* context */ \
o = dict_get_value(curbuf->b_vars, cstr_as_string(k), &err); \
+ api_clear_error(&err); \
if (o.type == kObjectTypeNil) { \
o = dict_get_value(&globvardict, cstr_as_string(k), &err); \
+ api_clear_error(&err); \
} \
} while (0)
diff --git a/src/nvim/testdir/samples/memfile_test.c b/src/nvim/testdir/samples/memfile_test.c
index 0fa1e14c40..3c8f108255 100644
--- a/src/nvim/testdir/samples/memfile_test.c
+++ b/src/nvim/testdir/samples/memfile_test.c
@@ -1,3 +1,6 @@
+// This is an open source non-commercial project. Dear PVS-Studio, please check
+// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
+
/* vi:set ts=8 sts=4 sw=4 noet:
*
* VIM - Vi IMproved by Bram Moolenaar
diff --git a/src/nvim/testdir/test_alot.vim b/src/nvim/testdir/test_alot.vim
index baf49b7ff7..99d9835996 100644
--- a/src/nvim/testdir/test_alot.vim
+++ b/src/nvim/testdir/test_alot.vim
@@ -26,6 +26,7 @@ source test_tabline.vim
" source test_tabpage.vim
source test_tagcase.vim
source test_tagjump.vim
+source test_taglist.vim
source test_true_false.vim
source test_unlet.vim
source test_utf8.vim
diff --git a/src/nvim/testdir/test_fold.vim b/src/nvim/testdir/test_fold.vim
index 976c6b5cd1..46c54e8614 100644
--- a/src/nvim/testdir/test_fold.vim
+++ b/src/nvim/testdir/test_fold.vim
@@ -100,22 +100,6 @@ func! Test_indent_fold2()
bw!
endfunc
-func Test_folds_marker_in_comment()
- new
- call setline(1, ['" foo', 'bar', 'baz'])
- setl fen fdm=marker
- setl com=sO:\"\ -,mO:\"\ \ ,eO:\"\",:\" cms=\"%s
- norm! zf2j
- setl nofen
- :1y
- call assert_equal(['" foo{{{'], getreg(0,1,1))
- :+2y
- call assert_equal(['baz"}}}'], getreg(0,1,1))
-
- set foldmethod&
- bwipe!
-endfunc
-
func Test_manual_fold_with_filter()
if !executable('cat')
return
@@ -138,6 +122,108 @@ func Test_manual_fold_with_filter()
endfor
endfunc
+func! Test_indent_fold_with_read()
+ new
+ set foldmethod=indent
+ call setline(1, repeat(["\<Tab>a"], 4))
+ for n in range(1, 4)
+ call assert_equal(1, foldlevel(n))
+ endfor
+
+ call writefile(["a", "", "\<Tab>a"], 'Xfile')
+ foldopen
+ 2read Xfile
+ %foldclose
+ call assert_equal(1, foldlevel(1))
+ call assert_equal(2, foldclosedend(1))
+ call assert_equal(0, foldlevel(3))
+ call assert_equal(0, foldlevel(4))
+ call assert_equal(1, foldlevel(5))
+ call assert_equal(7, foldclosedend(5))
+
+ bwipe!
+ set foldmethod&
+ call delete('Xfile')
+endfunc
+
+func Test_combining_folds_indent()
+ new
+ let one = "\<Tab>a"
+ let zero = 'a'
+ call setline(1, [one, one, zero, zero, zero, one, one, one])
+ set foldmethod=indent
+ 3,5d
+ %foldclose
+ call assert_equal(5, foldclosedend(1))
+
+ set foldmethod&
+ bwipe!
+endfunc
+
+func Test_combining_folds_marker()
+ new
+ call setline(1, ['{{{', '}}}', '', '', '', '{{{', '', '}}}'])
+ set foldmethod=marker
+ 3,5d
+ %foldclose
+ call assert_equal(2, foldclosedend(1))
+
+ set foldmethod&
+ bwipe!
+endfunc
+
+func Test_folds_marker_in_comment()
+ new
+ call setline(1, ['" foo', 'bar', 'baz'])
+ setl fen fdm=marker
+ setl com=sO:\"\ -,mO:\"\ \ ,eO:\"\",:\" cms=\"%s
+ norm! zf2j
+ setl nofen
+ :1y
+ call assert_equal(['" foo{{{'], getreg(0,1,1))
+ :+2y
+ call assert_equal(['baz"}}}'], getreg(0,1,1))
+
+ set foldmethod&
+ bwipe!
+endfunc
+
+func s:TestFoldExpr(lnum)
+ let thisline = getline(a:lnum)
+ if thisline == 'a'
+ return 1
+ elseif thisline == 'b'
+ return 0
+ elseif thisline == 'c'
+ return '<1'
+ elseif thisline == 'd'
+ return '>1'
+ endif
+ return 0
+endfunction
+
+func Test_update_folds_expr_read()
+ new
+ call setline(1, ['a', 'a', 'a', 'a', 'a', 'a'])
+ set foldmethod=expr
+ set foldexpr=s:TestFoldExpr(v:lnum)
+ 2
+ foldopen
+ call writefile(['b', 'b', 'a', 'a', 'd', 'a', 'a', 'c'], 'Xfile')
+ read Xfile
+ %foldclose
+ call assert_equal(2, foldclosedend(1))
+ call assert_equal(0, foldlevel(3))
+ call assert_equal(0, foldlevel(4))
+ call assert_equal(6, foldclosedend(5))
+ call assert_equal(10, foldclosedend(7))
+ call assert_equal(14, foldclosedend(11))
+
+ call delete('Xfile')
+ bwipe!
+ set foldmethod& foldexpr&
+endfunc
+
func! Test_move_folds_around_manual()
new
let input = PrepIndent("a") + PrepIndent("b") + PrepIndent("c")
diff --git a/src/nvim/testdir/test_functions.vim b/src/nvim/testdir/test_functions.vim
index 81cb6314ce..3c258299c1 100644
--- a/src/nvim/testdir/test_functions.vim
+++ b/src/nvim/testdir/test_functions.vim
@@ -29,3 +29,147 @@ func Test_setbufvar_options()
bwipe!
endfunc
+func Test_tolower()
+ call assert_equal("", tolower(""))
+
+ " Test with all printable ASCII characters.
+ call assert_equal(' !"#$%&''()*+,-./0123456789:;<=>?@abcdefghijklmnopqrstuvwxyz[\]^_`abcdefghijklmnopqrstuvwxyz{|}~',
+ \ tolower(' !"#$%&''()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~'))
+
+ if !has('multi_byte')
+ return
+ endif
+
+ " Test with a few uppercase diacritics.
+ call assert_equal("aàáâãäåāăąǎǟǡả", tolower("AÀÁÂÃÄÅĀĂĄǍǞǠẢ"))
+ call assert_equal("bḃḇ", tolower("BḂḆ"))
+ call assert_equal("cçćĉċč", tolower("CÇĆĈĊČ"))
+ call assert_equal("dďđḋḏḑ", tolower("DĎĐḊḎḐ"))
+ call assert_equal("eèéêëēĕėęěẻẽ", tolower("EÈÉÊËĒĔĖĘĚẺẼ"))
+ call assert_equal("fḟ ", tolower("FḞ "))
+ call assert_equal("gĝğġģǥǧǵḡ", tolower("GĜĞĠĢǤǦǴḠ"))
+ call assert_equal("hĥħḣḧḩ", tolower("HĤĦḢḦḨ"))
+ call assert_equal("iìíîïĩīĭįiǐỉ", tolower("IÌÍÎÏĨĪĬĮİǏỈ"))
+ call assert_equal("jĵ", tolower("JĴ"))
+ call assert_equal("kķǩḱḵ", tolower("KĶǨḰḴ"))
+ call assert_equal("lĺļľŀłḻ", tolower("LĹĻĽĿŁḺ"))
+ call assert_equal("mḿṁ", tolower("MḾṀ"))
+ call assert_equal("nñńņňṅṉ", tolower("NÑŃŅŇṄṈ"))
+ call assert_equal("oòóôõöøōŏőơǒǫǭỏ", tolower("OÒÓÔÕÖØŌŎŐƠǑǪǬỎ"))
+ call assert_equal("pṕṗ", tolower("PṔṖ"))
+ call assert_equal("q", tolower("Q"))
+ call assert_equal("rŕŗřṙṟ", tolower("RŔŖŘṘṞ"))
+ call assert_equal("sśŝşšṡ", tolower("SŚŜŞŠṠ"))
+ call assert_equal("tţťŧṫṯ", tolower("TŢŤŦṪṮ"))
+ call assert_equal("uùúûüũūŭůűųưǔủ", tolower("UÙÚÛÜŨŪŬŮŰŲƯǓỦ"))
+ call assert_equal("vṽ", tolower("VṼ"))
+ call assert_equal("wŵẁẃẅẇ", tolower("WŴẀẂẄẆ"))
+ call assert_equal("xẋẍ", tolower("XẊẌ"))
+ call assert_equal("yýŷÿẏỳỷỹ", tolower("YÝŶŸẎỲỶỸ"))
+ call assert_equal("zźżžƶẑẕ", tolower("ZŹŻŽƵẐẔ"))
+
+ " Test with a few lowercase diacritics, which should remain unchanged.
+ call assert_equal("aàáâãäåāăąǎǟǡả", tolower("aàáâãäåāăąǎǟǡả"))
+ call assert_equal("bḃḇ", tolower("bḃḇ"))
+ call assert_equal("cçćĉċč", tolower("cçćĉċč"))
+ call assert_equal("dďđḋḏḑ", tolower("dďđḋḏḑ"))
+ call assert_equal("eèéêëēĕėęěẻẽ", tolower("eèéêëēĕėęěẻẽ"))
+ call assert_equal("fḟ", tolower("fḟ"))
+ call assert_equal("gĝğġģǥǧǵḡ", tolower("gĝğġģǥǧǵḡ"))
+ call assert_equal("hĥħḣḧḩẖ", tolower("hĥħḣḧḩẖ"))
+ call assert_equal("iìíîïĩīĭįǐỉ", tolower("iìíîïĩīĭįǐỉ"))
+ call assert_equal("jĵǰ", tolower("jĵǰ"))
+ call assert_equal("kķǩḱḵ", tolower("kķǩḱḵ"))
+ call assert_equal("lĺļľŀłḻ", tolower("lĺļľŀłḻ"))
+ call assert_equal("mḿṁ ", tolower("mḿṁ "))
+ call assert_equal("nñńņňʼnṅṉ", tolower("nñńņňʼnṅṉ"))
+ call assert_equal("oòóôõöøōŏőơǒǫǭỏ", tolower("oòóôõöøōŏőơǒǫǭỏ"))
+ call assert_equal("pṕṗ", tolower("pṕṗ"))
+ call assert_equal("q", tolower("q"))
+ call assert_equal("rŕŗřṙṟ", tolower("rŕŗřṙṟ"))
+ call assert_equal("sśŝşšṡ", tolower("sśŝşšṡ"))
+ call assert_equal("tţťŧṫṯẗ", tolower("tţťŧṫṯẗ"))
+ call assert_equal("uùúûüũūŭůűųưǔủ", tolower("uùúûüũūŭůűųưǔủ"))
+ call assert_equal("vṽ", tolower("vṽ"))
+ call assert_equal("wŵẁẃẅẇẘ", tolower("wŵẁẃẅẇẘ"))
+ call assert_equal("ẋẍ", tolower("ẋẍ"))
+ call assert_equal("yýÿŷẏẙỳỷỹ", tolower("yýÿŷẏẙỳỷỹ"))
+ call assert_equal("zźżžƶẑẕ", tolower("zźżžƶẑẕ"))
+
+ " According to https://twitter.com/jifa/status/625776454479970304
+ " Ⱥ (U+023A) and Ⱦ (U+023E) are the *only* code points to increase
+ " in length (2 to 3 bytes) when lowercased. So let's test them.
+ call assert_equal("ⱥ ⱦ", tolower("Ⱥ Ⱦ"))
+endfunc
+
+func Test_toupper()
+ call assert_equal("", toupper(""))
+
+ " Test with all printable ASCII characters.
+ call assert_equal(' !"#$%&''()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`ABCDEFGHIJKLMNOPQRSTUVWXYZ{|}~',
+ \ toupper(' !"#$%&''()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~'))
+
+ if !has('multi_byte')
+ return
+ endif
+
+ " Test with a few lowercase diacritics.
+ call assert_equal("AÀÁÂÃÄÅĀĂĄǍǞǠẢ", toupper("aàáâãäåāăąǎǟǡả"))
+ call assert_equal("BḂḆ", toupper("bḃḇ"))
+ call assert_equal("CÇĆĈĊČ", toupper("cçćĉċč"))
+ call assert_equal("DĎĐḊḎḐ", toupper("dďđḋḏḑ"))
+ call assert_equal("EÈÉÊËĒĔĖĘĚẺẼ", toupper("eèéêëēĕėęěẻẽ"))
+ call assert_equal("FḞ", toupper("fḟ"))
+ call assert_equal("GĜĞĠĢǤǦǴḠ", toupper("gĝğġģǥǧǵḡ"))
+ call assert_equal("HĤĦḢḦḨẖ", toupper("hĥħḣḧḩẖ"))
+ call assert_equal("IÌÍÎÏĨĪĬĮǏỈ", toupper("iìíîïĩīĭįǐỉ"))
+ call assert_equal("JĴǰ", toupper("jĵǰ"))
+ call assert_equal("KĶǨḰḴ", toupper("kķǩḱḵ"))
+ call assert_equal("LĹĻĽĿŁḺ", toupper("lĺļľŀłḻ"))
+ call assert_equal("MḾṀ ", toupper("mḿṁ "))
+ call assert_equal("NÑŃŅŇʼnṄṈ", toupper("nñńņňʼnṅṉ"))
+ call assert_equal("OÒÓÔÕÖØŌŎŐƠǑǪǬỎ", toupper("oòóôõöøōŏőơǒǫǭỏ"))
+ call assert_equal("PṔṖ", toupper("pṕṗ"))
+ call assert_equal("Q", toupper("q"))
+ call assert_equal("RŔŖŘṘṞ", toupper("rŕŗřṙṟ"))
+ call assert_equal("SŚŜŞŠṠ", toupper("sśŝşšṡ"))
+ call assert_equal("TŢŤŦṪṮẗ", toupper("tţťŧṫṯẗ"))
+ call assert_equal("UÙÚÛÜŨŪŬŮŰŲƯǓỦ", toupper("uùúûüũūŭůűųưǔủ"))
+ call assert_equal("VṼ", toupper("vṽ"))
+ call assert_equal("WŴẀẂẄẆẘ", toupper("wŵẁẃẅẇẘ"))
+ call assert_equal("ẊẌ", toupper("ẋẍ"))
+ call assert_equal("YÝŸŶẎẙỲỶỸ", toupper("yýÿŷẏẙỳỷỹ"))
+ call assert_equal("ZŹŻŽƵẐẔ", toupper("zźżžƶẑẕ"))
+
+ " Test that uppercase diacritics, which should remain unchanged.
+ call assert_equal("AÀÁÂÃÄÅĀĂĄǍǞǠẢ", toupper("AÀÁÂÃÄÅĀĂĄǍǞǠẢ"))
+ call assert_equal("BḂḆ", toupper("BḂḆ"))
+ call assert_equal("CÇĆĈĊČ", toupper("CÇĆĈĊČ"))
+ call assert_equal("DĎĐḊḎḐ", toupper("DĎĐḊḎḐ"))
+ call assert_equal("EÈÉÊËĒĔĖĘĚẺẼ", toupper("EÈÉÊËĒĔĖĘĚẺẼ"))
+ call assert_equal("FḞ ", toupper("FḞ "))
+ call assert_equal("GĜĞĠĢǤǦǴḠ", toupper("GĜĞĠĢǤǦǴḠ"))
+ call assert_equal("HĤĦḢḦḨ", toupper("HĤĦḢḦḨ"))
+ call assert_equal("IÌÍÎÏĨĪĬĮİǏỈ", toupper("IÌÍÎÏĨĪĬĮİǏỈ"))
+ call assert_equal("JĴ", toupper("JĴ"))
+ call assert_equal("KĶǨḰḴ", toupper("KĶǨḰḴ"))
+ call assert_equal("LĹĻĽĿŁḺ", toupper("LĹĻĽĿŁḺ"))
+ call assert_equal("MḾṀ", toupper("MḾṀ"))
+ call assert_equal("NÑŃŅŇṄṈ", toupper("NÑŃŅŇṄṈ"))
+ call assert_equal("OÒÓÔÕÖØŌŎŐƠǑǪǬỎ", toupper("OÒÓÔÕÖØŌŎŐƠǑǪǬỎ"))
+ call assert_equal("PṔṖ", toupper("PṔṖ"))
+ call assert_equal("Q", toupper("Q"))
+ call assert_equal("RŔŖŘṘṞ", toupper("RŔŖŘṘṞ"))
+ call assert_equal("SŚŜŞŠṠ", toupper("SŚŜŞŠṠ"))
+ call assert_equal("TŢŤŦṪṮ", toupper("TŢŤŦṪṮ"))
+ call assert_equal("UÙÚÛÜŨŪŬŮŰŲƯǓỦ", toupper("UÙÚÛÜŨŪŬŮŰŲƯǓỦ"))
+ call assert_equal("VṼ", toupper("VṼ"))
+ call assert_equal("WŴẀẂẄẆ", toupper("WŴẀẂẄẆ"))
+ call assert_equal("XẊẌ", toupper("XẊẌ"))
+ call assert_equal("YÝŶŸẎỲỶỸ", toupper("YÝŶŸẎỲỶỸ"))
+ call assert_equal("ZŹŻŽƵẐẔ", toupper("ZŹŻŽƵẐẔ"))
+
+ call assert_equal("ⱥ ⱦ", tolower("Ⱥ Ⱦ"))
+endfunc
+
+
diff --git a/src/nvim/testdir/test_mapping.vim b/src/nvim/testdir/test_mapping.vim
index d937565ce5..7f93ddd56e 100644
--- a/src/nvim/testdir/test_mapping.vim
+++ b/src/nvim/testdir/test_mapping.vim
@@ -35,29 +35,81 @@ func Test_map_ctrl_c_visual()
endfunc
func Test_map_langmap()
- " langmap should not get remapped in insert mode
- inoremap { FAIL_ilangmap
- set langmap=+{ langnoremap
+ if !has('langmap')
+ return
+ endif
+
+ " check langmap applies in normal mode
+ set langmap=+- nolangremap
+ new
+ call setline(1, ['a', 'b', 'c'])
+ 2
+ call assert_equal('b', getline('.'))
+ call feedkeys("+", "xt")
+ call assert_equal('a', getline('.'))
+
+ " check no remapping
+ map x +
+ 2
+ call feedkeys("x", "xt")
+ call assert_equal('c', getline('.'))
+
+ " check with remapping
+ set langremap
+ 2
+ call feedkeys("x", "xt")
+ call assert_equal('a', getline('.'))
+
+ unmap x
+ bwipe!
+
+ " 'langnoremap' follows 'langremap' and vise versa
+ set langremap
+ set langnoremap
+ call assert_equal(0, &langremap)
+ set langremap
+ call assert_equal(0, &langnoremap)
+ set nolangremap
+ call assert_equal(1, &langnoremap)
+
+ " check default values
+ set langnoremap&
+ call assert_equal(1, &langnoremap)
+ call assert_equal(0, &langremap)
+ set langremap&
+ call assert_equal(1, &langnoremap)
+ call assert_equal(0, &langremap)
+
+ " langmap should not apply in insert mode, 'langremap' doesn't matter
+ set langmap=+{ nolangremap
call feedkeys("Go+\<Esc>", "xt")
call assert_equal('+', getline('$'))
-
- " Insert-mode expr mapping with langmap
- inoremap <expr> { "FAIL_iexplangmap"
+ set langmap=+{ langremap
call feedkeys("Go+\<Esc>", "xt")
call assert_equal('+', getline('$'))
- iunmap <expr> {
- " langmap should not get remapped in Command-line mode
- cnoremap { FAIL_clangmap
+ " langmap used for register name in insert mode.
+ call setreg('a', 'aaaa')
+ call setreg('b', 'bbbb')
+ call setreg('c', 'cccc')
+ set langmap=ab langremap
+ call feedkeys("Go\<C-R>a\<Esc>", "xt")
+ call assert_equal('bbbb', getline('$'))
+ call feedkeys("Go\<C-R>\<C-R>a\<Esc>", "xt")
+ call assert_equal('bbbb', getline('$'))
+ " mapping does not apply
+ imap c a
+ call feedkeys("Go\<C-R>c\<Esc>", "xt")
+ call assert_equal('cccc', getline('$'))
+ imap a c
+ call feedkeys("Go\<C-R>a\<Esc>", "xt")
+ call assert_equal('bbbb', getline('$'))
+
+ " langmap should not apply in Command-line mode
+ set langmap=+{ nolangremap
call feedkeys(":call append(line('$'), '+')\<CR>", "xt")
call assert_equal('+', getline('$'))
- cunmap {
- " Command-line mode expr mapping with langmap
- cnoremap <expr> { "FAIL_cexplangmap"
- call feedkeys(":call append(line('$'), '+')\<CR>", "xt")
- call assert_equal('+', getline('$'))
- cunmap {
set nomodified
endfunc
@@ -98,3 +150,11 @@ func Test_break_undo()
call assert_equal('new line here', getline(line('$') - 1))
set nomodified
endfunc
+
+func Test_map_meta_quotes()
+ imap <M-"> foo
+ call feedkeys("Go-\<M-\">-\<Esc>", "xt")
+ call assert_equal("-foo-", getline('$'))
+ set nomodified
+ iunmap <M-">
+endfunc
diff --git a/src/nvim/testdir/test_normal.vim b/src/nvim/testdir/test_normal.vim
index a22dca35cc..6261625801 100644
--- a/src/nvim/testdir/test_normal.vim
+++ b/src/nvim/testdir/test_normal.vim
@@ -1606,6 +1606,52 @@ fun! Test_normal30_changecase()
norm! V~
call assert_equal('THIS IS A simple test: äüöss', getline('.'))
+ " Turkish ASCII turns to multi-byte. On some systems Turkish locale
+ " is available but toupper()/tolower() don't do the right thing.
+ try
+ lang tr_TR.UTF-8
+ set casemap=
+ let iupper = toupper('i')
+ if iupper == "\u0130"
+ call setline(1, 'iI')
+ 1normal gUU
+ call assert_equal("\u0130I", getline(1))
+ call assert_equal("\u0130I", toupper("iI"))
+
+ call setline(1, 'iI')
+ 1normal guu
+ call assert_equal("i\u0131", getline(1))
+ call assert_equal("i\u0131", tolower("iI"))
+ elseif iupper == "I"
+ call setline(1, 'iI')
+ 1normal gUU
+ call assert_equal("II", getline(1))
+ call assert_equal("II", toupper("iI"))
+
+ call setline(1, 'iI')
+ 1normal guu
+ call assert_equal("ii", getline(1))
+ call assert_equal("ii", tolower("iI"))
+ else
+ call assert_true(false, "expected toupper('i') to be either 'I' or '\u0131'")
+ endif
+ set casemap&
+ call setline(1, 'iI')
+ 1normal gUU
+ call assert_equal("II", getline(1))
+ call assert_equal("II", toupper("iI"))
+
+ call setline(1, 'iI')
+ 1normal guu
+ call assert_equal("ii", getline(1))
+ call assert_equal("ii", tolower("iI"))
+
+ lang en_US.UTF-8
+ catch /E197:/
+ " can't use Turkish locale
+ throw 'Skipped: Turkish locale not available'
+ endtry
+
" clean up
bw!
endfunc
diff --git a/src/nvim/testdir/test_taglist.vim b/src/nvim/testdir/test_taglist.vim
new file mode 100644
index 0000000000..2d1557ebd9
--- /dev/null
+++ b/src/nvim/testdir/test_taglist.vim
@@ -0,0 +1,58 @@
+" test 'taglist' function
+
+func Test_taglist()
+ call writefile([
+ \ "FFoo\tXfoo\t1",
+ \ "FBar\tXfoo\t2",
+ \ "BFoo\tXbar\t1",
+ \ "BBar\tXbar\t2"
+ \ ], 'Xtags')
+ set tags=Xtags
+ split Xtext
+
+ call assert_equal(['FFoo', 'BFoo'], map(taglist("Foo"), {i, v -> v.name}))
+ call assert_equal(['FFoo', 'BFoo'], map(taglist("Foo", "Xtext"), {i, v -> v.name}))
+ call assert_equal(['FFoo', 'BFoo'], map(taglist("Foo", "Xfoo"), {i, v -> v.name}))
+ call assert_equal(['BFoo', 'FFoo'], map(taglist("Foo", "Xbar"), {i, v -> v.name}))
+
+ call delete('Xtags')
+ bwipe
+endfunc
+
+func Test_taglist_native_etags()
+ if !has('emacs_tags')
+ return
+ endif
+ call writefile([
+ \ "\x0c",
+ \ "src/os_unix.c,13491",
+ \ "set_signals(\x7f1335,32699",
+ \ "reset_signals(\x7f1407,34136",
+ \ ], 'Xtags')
+
+ set tags=Xtags
+
+ call assert_equal([['set_signals', '1335,32699'], ['reset_signals', '1407,34136']],
+ \ map(taglist('set_signals'), {i, v -> [v.name, v.cmd]}))
+
+ call delete('Xtags')
+endfunc
+
+func Test_taglist_ctags_etags()
+ if !has('emacs_tags')
+ return
+ endif
+ call writefile([
+ \ "\x0c",
+ \ "src/os_unix.c,13491",
+ \ "set_signals(void)\x7fset_signals\x011335,32699",
+ \ "reset_signals(void)\x7freset_signals\x011407,34136",
+ \ ], 'Xtags')
+
+ set tags=Xtags
+
+ call assert_equal([['set_signals', '1335,32699'], ['reset_signals', '1407,34136']],
+ \ map(taglist('set_signals'), {i, v -> [v.name, v.cmd]}))
+
+ call delete('Xtags')
+endfunc
diff --git a/src/nvim/testdir/test_timers.vim b/src/nvim/testdir/test_timers.vim
index 56f9feef66..d377062780 100644
--- a/src/nvim/testdir/test_timers.vim
+++ b/src/nvim/testdir/test_timers.vim
@@ -4,8 +4,10 @@ if !has('timers')
finish
endif
+source shared.vim
+
func MyHandler(timer)
- let s:val += 1
+ let g:val += 1
endfunc
func MyHandlerWithLists(lists, timer)
@@ -13,44 +15,159 @@ func MyHandlerWithLists(lists, timer)
endfunc
func Test_oneshot()
- let s:val = 0
+ let g:val = 0
let timer = timer_start(50, 'MyHandler')
- sleep 200m
- call assert_equal(1, s:val)
+ let slept = WaitFor('g:val == 1')
+ call assert_equal(1, g:val)
+ if has('reltime')
+ call assert_inrange(40, 100, slept)
+ else
+ call assert_inrange(20, 100, slept)
+ endif
endfunc
func Test_repeat_three()
- let s:val = 0
+ let g:val = 0
let timer = timer_start(50, 'MyHandler', {'repeat': 3})
- sleep 500m
- call assert_equal(3, s:val)
+ let slept = WaitFor('g:val == 3')
+ call assert_equal(3, g:val)
+ if has('reltime')
+ call assert_inrange(120, 250, slept)
+ else
+ call assert_inrange(80, 200, slept)
+ endif
endfunc
func Test_repeat_many()
- let s:val = 0
+ let g:val = 0
let timer = timer_start(50, 'MyHandler', {'repeat': -1})
sleep 200m
call timer_stop(timer)
- call assert_true(s:val > 1)
- call assert_true(s:val < 5)
+ call assert_inrange(2, 4, g:val)
endfunc
func Test_with_partial_callback()
- let s:val = 0
- let s:meow = {}
- function s:meow.bite(...)
- let s:val += 1
+ let g:val = 0
+ let meow = {'one': 1}
+ function meow.bite(...)
+ let g:val += self.one
endfunction
- call timer_start(50, s:meow.bite)
- sleep 200m
- call assert_equal(1, s:val)
+ call timer_start(50, meow.bite)
+ let slept = WaitFor('g:val == 1')
+ call assert_equal(1, g:val)
+ if has('reltime')
+ call assert_inrange(40, 130, slept)
+ else
+ call assert_inrange(20, 100, slept)
+ endif
endfunc
func Test_retain_partial()
- call timer_start(100, function('MyHandlerWithLists', [['a']]))
+ call timer_start(50, function('MyHandlerWithLists', [['a']]))
call garbagecollect()
+ sleep 100m
+endfunc
+
+func Test_info()
+ let id = timer_start(1000, 'MyHandler')
+ let info = timer_info(id)
+ call assert_equal(id, info[0]['id'])
+ call assert_equal(1000, info[0]['time'])
+ call assert_equal("function('MyHandler')", string(info[0]['callback']))
+
+ let found = 0
+ for info in timer_info()
+ if info['id'] == id
+ let found += 1
+ endif
+ endfor
+ call assert_equal(1, found)
+
+ call timer_stop(id)
+ call assert_equal([], timer_info(id))
+endfunc
+
+func Test_stopall()
+ let id1 = timer_start(1000, 'MyHandler')
+ let id2 = timer_start(2000, 'MyHandler')
+ let info = timer_info()
+ call assert_equal(2, len(info))
+
+ call timer_stopall()
+ let info = timer_info()
+ call assert_equal(0, len(info))
+endfunc
+
+func Test_paused()
+ let g:val = 0
+
+ let id = timer_start(50, 'MyHandler')
+ let info = timer_info(id)
+ call assert_equal(0, info[0]['paused'])
+
+ call timer_pause(id, 1)
+ let info = timer_info(id)
+ call assert_equal(1, info[0]['paused'])
sleep 200m
+ call assert_equal(0, g:val)
+
+ call timer_pause(id, 0)
+ let info = timer_info(id)
+ call assert_equal(0, info[0]['paused'])
+
+ let slept = WaitFor('g:val == 1')
+ call assert_equal(1, g:val)
+ if has('reltime')
+ call assert_inrange(0, 60, slept)
+ else
+ call assert_inrange(0, 10, slept)
+ endif
endfunc
+func StopMyself(timer)
+ let g:called += 1
+ if g:called == 2
+ call timer_stop(a:timer)
+ endif
+endfunc
+
+func Test_delete_myself()
+ let g:called = 0
+ let t = timer_start(10, 'StopMyself', {'repeat': -1})
+ call WaitFor('g:called == 2')
+ call assert_equal(2, g:called)
+ call assert_equal([], timer_info(t))
+endfunc
+
+func StopTimer1(timer)
+ let g:timer2 = timer_start(10, 'StopTimer2')
+ " avoid maxfuncdepth error
+ call timer_pause(g:timer1, 1)
+ sleep 40m
+endfunc
+
+func StopTimer2(timer)
+ call timer_stop(g:timer1)
+endfunc
+
+func Test_stop_in_callback()
+ let g:timer1 = timer_start(10, 'StopTimer1')
+ sleep 40m
+endfunc
+
+func StopTimerAll(timer)
+ call timer_stopall()
+endfunc
+
+func Test_stop_all_in_callback()
+ let g:timer1 = timer_start(10, 'StopTimerAll')
+ let info = timer_info()
+ call assert_equal(1, len(info))
+ sleep 40m
+ let info = timer_info()
+ call assert_equal(0, len(info))
+endfunc
+
+
" vim: shiftwidth=2 sts=2 expandtab
diff --git a/src/nvim/tui/input.c b/src/nvim/tui/input.c
index 8e5adb14f9..b86ab8cf2f 100644
--- a/src/nvim/tui/input.c
+++ b/src/nvim/tui/input.c
@@ -1,3 +1,6 @@
+// This is an open source non-commercial project. Dear PVS-Studio, please check
+// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
+
#include "nvim/tui/input.h"
#include "nvim/vim.h"
@@ -220,12 +223,14 @@ static int get_key_code_timeout(void)
{
Integer ms = -1;
// Check 'ttimeout' to determine if we should send ESC after 'ttimeoutlen'.
- // See :help 'ttimeout' for more information
Error err = ERROR_INIT;
if (nvim_get_option(cstr_as_string("ttimeout"), &err).data.boolean) {
- ms = nvim_get_option(cstr_as_string("ttimeoutlen"), &err).data.integer;
+ Object rv = nvim_get_option(cstr_as_string("ttimeoutlen"), &err);
+ if (!ERROR_SET(&err)) {
+ ms = rv.data.integer;
+ }
}
-
+ api_clear_error(&err);
return (int)ms;
}
diff --git a/src/nvim/tui/tui.c b/src/nvim/tui/tui.c
index 55936ad58d..ae7551098d 100644
--- a/src/nvim/tui/tui.c
+++ b/src/nvim/tui/tui.c
@@ -1,3 +1,6 @@
+// This is an open source non-commercial project. Dear PVS-Studio, please check
+// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
+
// Terminal UI functions. Invoked (by ui_bridge.c) on the TUI thread.
#include <assert.h>
@@ -31,6 +34,8 @@
#include "nvim/ugrid.h"
#include "nvim/tui/input.h"
#include "nvim/tui/tui.h"
+#include "nvim/cursor_shape.h"
+#include "nvim/syntax.h"
// Space reserved in the output buffer to restore the cursor to normal when
// flushing. No existing terminal will require 32 bytes to do that.
@@ -38,6 +43,15 @@
#define OUTBUF_SIZE 0xffff
#define TOO_MANY_EVENTS 1000000
+#define STARTS_WITH(str, prefix) (!memcmp(str, prefix, sizeof(prefix) - 1))
+
+typedef enum TermType {
+ kTermUnknown,
+ kTermGnome,
+ kTermiTerm,
+ kTermKonsole,
+ kTermRxvt,
+} TermType;
typedef struct {
int top, bot, left, right;
@@ -69,18 +83,21 @@ typedef struct {
bool can_use_terminal_scroll;
bool mouse_enabled;
bool busy;
+ cursorentry_T cursor_shapes[SHAPE_IDX_COUNT];
HlAttrs print_attrs;
- int showing_mode;
+ ModeShape showing_mode;
+ TermType term;
struct {
int enable_mouse, disable_mouse;
int enable_bracketed_paste, disable_bracketed_paste;
- int set_cursor_shape_bar, set_cursor_shape_ul, set_cursor_shape_block;
int set_rgb_foreground, set_rgb_background;
+ int set_cursor_color;
int enable_focus_reporting, disable_focus_reporting;
} unibi_ext;
} TUIData;
static bool volatile got_winch = false;
+static bool cursor_style_enabled = false;
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "tui/tui.c.generated.h"
@@ -97,6 +114,7 @@ UI *tui_start(void)
ui->clear = tui_clear;
ui->eol_clear = tui_eol_clear;
ui->cursor_goto = tui_cursor_goto;
+ ui->mode_info_set = tui_mode_info_set;
ui->update_menu = tui_update_menu;
ui->busy_start = tui_busy_start;
ui->busy_stop = tui_busy_stop;
@@ -126,14 +144,12 @@ static void terminfo_start(UI *ui)
data->can_use_terminal_scroll = true;
data->bufpos = 0;
data->bufsize = sizeof(data->buf) - CNORM_COMMAND_MAX_SIZE;
- data->showing_mode = 0;
+ data->showing_mode = SHAPE_IDX_N;
data->unibi_ext.enable_mouse = -1;
data->unibi_ext.disable_mouse = -1;
+ data->unibi_ext.set_cursor_color = -1;
data->unibi_ext.enable_bracketed_paste = -1;
data->unibi_ext.disable_bracketed_paste = -1;
- data->unibi_ext.set_cursor_shape_bar = -1;
- data->unibi_ext.set_cursor_shape_ul = -1;
- data->unibi_ext.set_cursor_shape_block = -1;
data->unibi_ext.enable_focus_reporting = -1;
data->unibi_ext.disable_focus_reporting = -1;
data->out_fd = 1;
@@ -146,11 +162,10 @@ static void terminfo_start(UI *ui)
data->ut = unibi_dummy();
}
fix_terminfo(data);
- // Initialize the cursor shape.
- unibi_out(ui, data->unibi_ext.set_cursor_shape_block);
// Set 't_Co' from the result of unibilium & fix_terminfo.
t_colors = unibi_get_num(data->ut, unibi_max_colors);
// Enter alternate screen and clear
+ // NOTE: Do this *before* changing terminal settings. #6433
unibi_out(ui, unibi_enter_ca_mode);
unibi_out(ui, unibi_clear_screen);
// Enable bracketed paste
@@ -171,7 +186,7 @@ static void terminfo_stop(UI *ui)
{
TUIData *data = ui->data;
// Destroy output stuff
- tui_mode_change(ui, NORMAL);
+ tui_mode_change(ui, SHAPE_IDX_N);
tui_mouse_off(ui);
unibi_out(ui, unibi_exit_attribute_mode);
// cursor should be set to normal before exiting alternate screen
@@ -434,6 +449,62 @@ static void tui_cursor_goto(UI *ui, int row, int col)
unibi_goto(ui, row, col);
}
+CursorShape tui_cursor_decode_shape(const char *shape_str)
+{
+ CursorShape shape = 0;
+ if (strequal(shape_str, "block")) {
+ shape = SHAPE_BLOCK;
+ } else if (strequal(shape_str, "vertical")) {
+ shape = SHAPE_VER;
+ } else if (strequal(shape_str, "horizontal")) {
+ shape = SHAPE_HOR;
+ } else {
+ EMSG2(_(e_invarg2), shape_str);
+ }
+ return shape;
+}
+
+static cursorentry_T decode_cursor_entry(Dictionary args)
+{
+ cursorentry_T r;
+
+ for (size_t i = 0; i < args.size; i++) {
+ char *key = args.items[i].key.data;
+ Object value = args.items[i].value;
+
+ if (strequal(key, "cursor_shape")) {
+ r.shape = tui_cursor_decode_shape(args.items[i].value.data.string.data);
+ } else if (strequal(key, "blinkon")) {
+ r.blinkon = (int)value.data.integer;
+ } else if (strequal(key, "blinkoff")) {
+ r.blinkoff = (int)value.data.integer;
+ } else if (strequal(key, "hl_id")) {
+ r.id = (int)value.data.integer;
+ }
+ }
+ return r;
+}
+
+static void tui_mode_info_set(UI *ui, bool guicursor_enabled, Array args)
+{
+ cursor_style_enabled = guicursor_enabled;
+ if (!guicursor_enabled) {
+ return; // Do not send cursor style control codes.
+ }
+ TUIData *data = ui->data;
+
+ assert(args.size);
+
+ // cursor style entries as defined by `shape_table`.
+ for (size_t i = 0; i < args.size; i++) {
+ assert(args.items[i].type == kObjectTypeDictionary);
+ cursorentry_T r = decode_cursor_entry(args.items[i].data.dictionary);
+ data->cursor_shapes[i] = r;
+ }
+
+ tui_set_mode(ui, data->showing_mode);
+}
+
static void tui_update_menu(UI *ui)
{
// Do nothing; menus are for GUI only
@@ -452,44 +523,86 @@ static void tui_busy_stop(UI *ui)
static void tui_mouse_on(UI *ui)
{
TUIData *data = ui->data;
- unibi_out(ui, data->unibi_ext.enable_mouse);
- data->mouse_enabled = true;
+ if (!data->mouse_enabled) {
+ unibi_out(ui, data->unibi_ext.enable_mouse);
+ data->mouse_enabled = true;
+ }
}
static void tui_mouse_off(UI *ui)
{
TUIData *data = ui->data;
- unibi_out(ui, data->unibi_ext.disable_mouse);
- data->mouse_enabled = false;
+ if (data->mouse_enabled) {
+ unibi_out(ui, data->unibi_ext.disable_mouse);
+ data->mouse_enabled = false;
+ }
}
-static void tui_mode_change(UI *ui, int mode)
+static void tui_set_mode(UI *ui, ModeShape mode)
{
+ if (!cursor_style_enabled) {
+ return;
+ }
TUIData *data = ui->data;
+ cursorentry_T c = data->cursor_shapes[mode];
+ int shape = c.shape;
+ bool is_tmux = os_getenv("TMUX") != NULL;
+ unibi_var_t vars[26 + 26] = { { 0 } };
- if (mode == INSERT) {
- if (data->showing_mode != INSERT) {
- unibi_out(ui, data->unibi_ext.set_cursor_shape_bar);
- }
- } else if (mode == CMDLINE) {
- if (data->showing_mode != CMDLINE) {
- unibi_out(ui, data->unibi_ext.set_cursor_shape_bar);
- }
- } else if (mode == REPLACE) {
- if (data->showing_mode != REPLACE) {
- unibi_out(ui, data->unibi_ext.set_cursor_shape_ul);
+# define TMUX_WRAP(seq) (is_tmux ? "\x1bPtmux;\x1b" seq "\x1b\\" : seq)
+ // Support changing cursor shape on some popular terminals.
+ const char *vte_version = os_getenv("VTE_VERSION");
+
+ if (data->term == kTermKonsole) {
+ // Konsole uses a proprietary escape code to set the cursor shape
+ // and does not support DECSCUSR.
+ switch (shape) {
+ case SHAPE_BLOCK: shape = 0; break;
+ case SHAPE_VER: shape = 1; break;
+ case SHAPE_HOR: shape = 2; break;
+ default: WLOG("Unknown shape value %d", shape); break;
}
- } else {
- assert(mode == NORMAL);
- if (data->showing_mode != NORMAL) {
- unibi_out(ui, data->unibi_ext.set_cursor_shape_block);
+ data->params[0].i = shape;
+ data->params[1].i = (c.blinkon == 0);
+
+ unibi_format(vars, vars + 26,
+ TMUX_WRAP("\x1b]50;CursorShape=%p1%d;BlinkingCursorEnabled=%p2%d\x07"),
+ data->params, out, ui, NULL, NULL);
+ } else if (!vte_version || atoi(vte_version) >= 3900) {
+ // Assume that the terminal supports DECSCUSR unless it is an
+ // old VTE based terminal. This should not get wrapped for tmux,
+ // which will handle it via its Ss/Se terminfo extension - usually
+ // according to its terminal-overrides.
+
+ switch (shape) {
+ case SHAPE_BLOCK: shape = 1; break;
+ case SHAPE_VER: shape = 5; break;
+ case SHAPE_HOR: shape = 3; break;
+ default: WLOG("Unknown shape value %d", shape); break;
}
+ data->params[0].i = shape + (c.blinkon ==0);
+ unibi_format(vars, vars + 26, "\x1b[%p1%d q",
+ data->params, out, ui, NULL, NULL);
+ }
+
+ if (c.id != 0 && ui->rgb) {
+ int attr = syn_id2attr(c.id);
+ attrentry_T *aep = syn_cterm_attr2entry(attr);
+ data->params[0].i = aep->rgb_bg_color;
+ unibi_out(ui, data->unibi_ext.set_cursor_color);
}
- data->showing_mode = mode;
+}
+
+/// @param mode editor mode
+static void tui_mode_change(UI *ui, int mode_idx)
+{
+ TUIData *data = ui->data;
+ tui_set_mode(ui, (ModeShape)mode_idx);
+ data->showing_mode = (ModeShape)mode_idx;
}
static void tui_set_scroll_region(UI *ui, int top, int bot, int left,
- int right)
+ int right)
{
TUIData *data = ui->data;
ugrid_set_scroll_region(&data->grid, top, bot, left, right);
@@ -817,6 +930,24 @@ static void unibi_set_if_empty(unibi_term *ut, enum unibi_string str,
}
}
+static TermType detect_term(const char *term, const char *colorterm)
+{
+ if (STARTS_WITH(term, "rxvt")) {
+ return kTermRxvt;
+ }
+ if (os_getenv("KONSOLE_PROFILE_NAME") || os_getenv("KONSOLE_DBUS_SESSION")) {
+ return kTermKonsole;
+ }
+ const char *termprg = os_getenv("TERM_PROGRAM");
+ if (termprg && strstr(termprg, "iTerm.app")) {
+ return kTermiTerm;
+ }
+ if (colorterm && strstr(colorterm, "gnome-terminal")) {
+ return kTermGnome;
+ }
+ return kTermUnknown;
+}
+
static void fix_terminfo(TUIData *data)
{
unibi_term *ut = data->ut;
@@ -826,12 +957,9 @@ static void fix_terminfo(TUIData *data)
if (!term) {
goto end;
}
+ data->term = detect_term(term, colorterm);
- bool inside_tmux = os_getenv("TMUX") != NULL;
-
-#define STARTS_WITH(str, prefix) (!memcmp(str, prefix, sizeof(prefix) - 1))
-
- if (STARTS_WITH(term, "rxvt")) {
+ if (data->term == kTermRxvt) {
unibi_set_if_empty(ut, unibi_exit_attribute_mode, "\x1b[m\x1b(B");
unibi_set_if_empty(ut, unibi_flash_screen, "\x1b[?5h$<20/>\x1b[?5l");
unibi_set_if_empty(ut, unibi_enter_italics_mode, "\x1b[3m");
@@ -843,7 +971,7 @@ static void fix_terminfo(TUIData *data)
unibi_set_if_empty(ut, unibi_from_status_line, "\x1b\\");
}
- if (STARTS_WITH(term, "xterm") || STARTS_WITH(term, "rxvt")) {
+ if (STARTS_WITH(term, "xterm") || data->term == kTermRxvt) {
const char *normal = unibi_get_str(ut, unibi_cursor_normal);
if (!normal) {
unibi_set_str(ut, unibi_cursor_normal, "\x1b[?25h");
@@ -880,48 +1008,21 @@ static void fix_terminfo(TUIData *data)
if ((colorterm && strstr(colorterm, "256"))
|| strstr(term, "256")
|| strstr(term, "xterm")) {
- // Assume TERM~=xterm or COLORTERM~=256 supports 256 colors.
+ // Assume TERM=~xterm or COLORTERM=~256 supports 256 colors.
unibi_set_num(ut, unibi_max_colors, 256);
unibi_set_str(ut, unibi_set_a_foreground, XTERM_SETAF);
unibi_set_str(ut, unibi_set_a_background, XTERM_SETAB);
}
- const char * env_cusr_shape = os_getenv("NVIM_TUI_ENABLE_CURSOR_SHAPE");
- if (env_cusr_shape && strncmp(env_cusr_shape, "0", 1) == 0) {
- goto end;
- }
- bool cusr_blink = env_cusr_shape && strncmp(env_cusr_shape, "2", 1) == 0;
-
-#define TMUX_WRAP(seq) (inside_tmux ? "\x1bPtmux;\x1b" seq "\x1b\\" : seq)
- // Support changing cursor shape on some popular terminals.
- const char *term_prog = os_getenv("TERM_PROGRAM");
- const char *vte_version = os_getenv("VTE_VERSION");
-
- if ((term_prog && !strcmp(term_prog, "Konsole"))
- || os_getenv("KONSOLE_DBUS_SESSION") != NULL) {
- // Konsole uses a proprietary escape code to set the cursor shape
- // and does not support DECSCUSR.
- data->unibi_ext.set_cursor_shape_bar = (int)unibi_add_ext_str(ut, NULL,
- TMUX_WRAP("\x1b]50;CursorShape=1\x07"));
- data->unibi_ext.set_cursor_shape_ul = (int)unibi_add_ext_str(ut, NULL,
- TMUX_WRAP("\x1b]50;CursorShape=2\x07"));
- data->unibi_ext.set_cursor_shape_block = (int)unibi_add_ext_str(ut, NULL,
- TMUX_WRAP("\x1b]50;CursorShape=0\x07"));
- } else if (!vte_version || atoi(vte_version) >= 3900) {
- // Assume that the terminal supports DECSCUSR unless it is an
- // old VTE based terminal. This should not get wrapped for tmux,
- // which will handle it via its Ss/Se terminfo extension - usually
- // according to its terminal-overrides.
- data->unibi_ext.set_cursor_shape_bar =
- (int)unibi_add_ext_str(ut, NULL, cusr_blink ? "\x1b[5 q" : "\x1b[6 q");
- data->unibi_ext.set_cursor_shape_ul =
- (int)unibi_add_ext_str(ut, NULL, cusr_blink ? "\x1b[3 q" : "\x1b[4 q");
- data->unibi_ext.set_cursor_shape_block =
- (int)unibi_add_ext_str(ut, NULL, cusr_blink ? "\x1b[1 q" : "\x1b[2 q");
- }
-
end:
// Fill some empty slots with common terminal strings
+ if (data->term == kTermiTerm) {
+ data->unibi_ext.set_cursor_color = (int)unibi_add_ext_str(
+ ut, NULL, "\033]Pl%p1%06x\033\\");
+ } else {
+ data->unibi_ext.set_cursor_color = (int)unibi_add_ext_str(
+ ut, NULL, "\033]12;#%p1%06x\007");
+ }
data->unibi_ext.enable_mouse = (int)unibi_add_ext_str(ut, NULL,
"\x1b[?1002h\x1b[?1006h");
data->unibi_ext.disable_mouse = (int)unibi_add_ext_str(ut, NULL,
@@ -1006,15 +1107,15 @@ static const char *tui_tk_ti_getstr(const char *name, const char *value,
stty_erase = tui_get_stty_erase();
}
- if (strcmp(name, "key_backspace") == 0) {
+ if (strequal(name, "key_backspace")) {
ILOG("libtermkey:kbs=%s", value);
if (stty_erase != NULL && stty_erase[0] != 0) {
return stty_erase;
}
- } else if (strcmp(name, "key_dc") == 0) {
+ } else if (strequal(name, "key_dc")) {
ILOG("libtermkey:kdch1=%s", value);
// Vim: "If <BS> and <DEL> are now the same, redefine <DEL>."
- if (stty_erase != NULL && value != NULL && strcmp(stty_erase, value) == 0) {
+ if (stty_erase != NULL && value != NULL && strequal(stty_erase, value)) {
return stty_erase[0] == DEL ? CTRL_H_STR : DEL_STR;
}
}
diff --git a/src/nvim/tui/tui.h b/src/nvim/tui/tui.h
index 07523bc124..2915b0e2f8 100644
--- a/src/nvim/tui/tui.h
+++ b/src/nvim/tui/tui.h
@@ -1,6 +1,8 @@
#ifndef NVIM_TUI_TUI_H
#define NVIM_TUI_TUI_H
+#include "nvim/cursor_shape.h"
+
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "tui/tui.h.generated.h"
#endif
diff --git a/src/nvim/ugrid.c b/src/nvim/ugrid.c
index 127b18feb6..7a0a16687e 100644
--- a/src/nvim/ugrid.c
+++ b/src/nvim/ugrid.c
@@ -1,3 +1,6 @@
+// This is an open source non-commercial project. Dear PVS-Studio, please check
+// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
+
#include <assert.h>
#include <stdbool.h>
#include <stdio.h>
diff --git a/src/nvim/ui.c b/src/nvim/ui.c
index ea42e3e357..69916fa4cd 100644
--- a/src/nvim/ui.c
+++ b/src/nvim/ui.c
@@ -1,3 +1,6 @@
+// This is an open source non-commercial project. Dear PVS-Studio, please check
+// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
+
#include <assert.h>
#include <inttypes.h>
#include <stdbool.h>
@@ -29,6 +32,7 @@
#include "nvim/screen.h"
#include "nvim/syntax.h"
#include "nvim/window.h"
+#include "nvim/cursor_shape.h"
#ifdef FEAT_TUI
# include "nvim/tui/tui.h"
#else
@@ -52,6 +56,7 @@ static int current_attr_code = 0;
static bool pending_cursor_update = false;
static int busy = 0;
static int height, width;
+static int old_mode_idx = -1;
// UI_CALL invokes a function on all registered UI instances. The functions can
// have 0-5 arguments (configurable by SELECT_NTH).
@@ -149,12 +154,6 @@ void ui_event(char *name, Array args)
}
}
-// May update the shape of the cursor.
-void ui_cursor_shape(void)
-{
- ui_mode_change();
-}
-
void ui_refresh(void)
{
if (!ui_active()) {
@@ -179,6 +178,9 @@ void ui_refresh(void)
row = col = 0;
screen_resize(width, height);
pum_set_external(pum_external);
+ ui_mode_info_set();
+ old_mode_idx = -1;
+ ui_cursor_shape();
}
static void ui_refresh_event(void **argv)
@@ -376,6 +378,14 @@ void ui_cursor_goto(int new_row, int new_col)
pending_cursor_update = true;
}
+void ui_mode_info_set(void)
+{
+ Array style = mode_style_array();
+ bool enabled = (*p_guicursor != NUL);
+ UI_CALL(mode_info_set, enabled, style);
+ api_free_array(style);
+}
+
void ui_update_menu(void)
{
UI_CALL(update_menu);
@@ -531,25 +541,19 @@ static void flush_cursor_update(void)
}
}
-// Notify that the current mode has changed. Can be used to change cursor
-// shape, for example.
-static void ui_mode_change(void)
+/// Check if current mode has changed.
+/// May update the shape of the cursor.
+void ui_cursor_shape(void)
{
- int mode;
if (!full_screen) {
return;
}
- // Get a simple UI mode out of State.
- if ((State & REPLACE) == REPLACE) {
- mode = REPLACE;
- } else if (State & INSERT) {
- mode = INSERT;
- } else if (State & CMDLINE) {
- mode = CMDLINE;
- } else {
- mode = NORMAL;
+ int mode_idx = cursor_get_mode_idx();
+
+ if (old_mode_idx != mode_idx) {
+ old_mode_idx = mode_idx;
+ UI_CALL(mode_change, mode_idx);
}
- UI_CALL(mode_change, mode);
conceal_check_cursur_line();
}
diff --git a/src/nvim/ui.h b/src/nvim/ui.h
index d14bc5812c..fcf52ac9e1 100644
--- a/src/nvim/ui.h
+++ b/src/nvim/ui.h
@@ -6,6 +6,7 @@
#include <stdint.h>
#include "api/private/defs.h"
+#include "nvim/buffer_defs.h"
typedef struct {
bool bold, underline, undercurl, italic, reverse;
@@ -22,12 +23,13 @@ struct ui_t {
void (*clear)(UI *ui);
void (*eol_clear)(UI *ui);
void (*cursor_goto)(UI *ui, int row, int col);
+ void (*mode_info_set)(UI *ui, bool enabled, Array cursor_styles);
void (*update_menu)(UI *ui);
void (*busy_start)(UI *ui);
void (*busy_stop)(UI *ui);
void (*mouse_on)(UI *ui);
void (*mouse_off)(UI *ui);
- void (*mode_change)(UI *ui, int mode);
+ void (*mode_change)(UI *ui, int mode_idx);
void (*set_scroll_region)(UI *ui, int top, int bot, int left, int right);
void (*scroll)(UI *ui, int count);
void (*highlight_set)(UI *ui, HlAttrs attrs);
diff --git a/src/nvim/ui_bridge.c b/src/nvim/ui_bridge.c
index 25861abc1b..5697c765ba 100644
--- a/src/nvim/ui_bridge.c
+++ b/src/nvim/ui_bridge.c
@@ -1,3 +1,6 @@
+// This is an open source non-commercial project. Dear PVS-Studio, please check
+// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
+
// UI wrapper that sends requests to the UI thread.
// Used by the built-in TUI and libnvim-based UIs.
@@ -13,6 +16,7 @@
#include "nvim/memory.h"
#include "nvim/ui_bridge.h"
#include "nvim/ugrid.h"
+#include "nvim/api/private/helpers.h"
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "ui_bridge.c.generated.h"
@@ -59,6 +63,7 @@ UI *ui_bridge_attach(UI *ui, ui_main_fn ui_main, event_scheduler scheduler)
rv->bridge.clear = ui_bridge_clear;
rv->bridge.eol_clear = ui_bridge_eol_clear;
rv->bridge.cursor_goto = ui_bridge_cursor_goto;
+ rv->bridge.mode_info_set = ui_bridge_mode_info_set;
rv->bridge.update_menu = ui_bridge_update_menu;
rv->bridge.busy_start = ui_bridge_busy_start;
rv->bridge.busy_stop = ui_bridge_busy_stop;
@@ -178,6 +183,25 @@ static void ui_bridge_cursor_goto_event(void **argv)
ui->cursor_goto(ui, PTR2INT(argv[1]), PTR2INT(argv[2]));
}
+static void ui_bridge_mode_info_set(UI *b, bool enabled, Array modes)
+{
+ bool *enabledp = xmalloc(sizeof(*enabledp));
+ Object *modesp = xmalloc(sizeof(*modesp));
+ *enabledp = enabled;
+ *modesp = copy_object(ARRAY_OBJ(modes));
+ UI_CALL(b, mode_info_set, 3, b, enabledp, modesp);
+}
+static void ui_bridge_mode_info_set_event(void **argv)
+{
+ UI *ui = UI(argv[0]);
+ bool *enabled = argv[1];
+ Object *modes = argv[2];
+ ui->mode_info_set(ui, *enabled, modes->data.array);
+ xfree(enabled);
+ api_free_object(*modes);
+ xfree(modes);
+}
+
static void ui_bridge_update_menu(UI *b)
{
UI_CALL(b, update_menu, 1, b);
@@ -228,9 +252,9 @@ static void ui_bridge_mouse_off_event(void **argv)
ui->mouse_off(ui);
}
-static void ui_bridge_mode_change(UI *b, int mode)
+static void ui_bridge_mode_change(UI *b, int mode_idx)
{
- UI_CALL(b, mode_change, 2, b, INT2PTR(mode));
+ UI_CALL(b, mode_change, 2, b, INT2PTR(mode_idx));
}
static void ui_bridge_mode_change_event(void **argv)
{
diff --git a/src/nvim/undo.c b/src/nvim/undo.c
index 4d4e8d9bb9..290d5d7553 100644
--- a/src/nvim/undo.c
+++ b/src/nvim/undo.c
@@ -1,3 +1,6 @@
+// This is an open source non-commercial project. Dear PVS-Studio, please check
+// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
+
/*
* undo.c: multi level undo facility
*
@@ -76,6 +79,7 @@
#include <inttypes.h>
#include <limits.h>
#include <stdbool.h>
+#include <stdint.h>
#include <string.h>
#include <fcntl.h>
@@ -966,12 +970,12 @@ static u_entry_T *unserialize_uep(bufinfo_T * bi, bool *error,
uep->ue_lcount = undo_read_4c(bi);
uep->ue_size = undo_read_4c(bi);
- char_u **array;
+ char_u **array = NULL;
if (uep->ue_size > 0) {
- array = xmalloc(sizeof(char_u *) * (size_t)uep->ue_size);
- memset(array, 0, sizeof(char_u *) * (size_t)uep->ue_size);
- } else {
- array = NULL;
+ if ((size_t)uep->ue_size < SIZE_MAX / sizeof(char_u *)) {
+ array = xmalloc(sizeof(char_u *) * (size_t)uep->ue_size);
+ memset(array, 0, sizeof(char_u *) * (size_t)uep->ue_size);
+ }
}
uep->ue_array = array;
@@ -1400,7 +1404,9 @@ void u_read_undo(char *name, char_u *hash, char_u *orig_name)
// sequence numbers of the headers.
// When there are no headers uhp_table is NULL.
if (num_head > 0) {
- uhp_table = xmalloc((size_t)num_head * sizeof(u_header_T *));
+ if ((size_t)num_head < SIZE_MAX / sizeof(*uhp_table)) {
+ uhp_table = xmalloc((size_t)num_head * sizeof(*uhp_table));
+ }
}
long num_read_uhps = 0;
diff --git a/src/nvim/version.c b/src/nvim/version.c
index 9275a2e5bd..b1aa8e2a4b 100644
--- a/src/nvim/version.c
+++ b/src/nvim/version.c
@@ -1,3 +1,6 @@
+// This is an open source non-commercial project. Dear PVS-Studio, please check
+// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
+
/// @file version.c
///
/// Nvim was forked from Vim 7.4.160.
@@ -82,7 +85,7 @@ static const int included_patches[] = {
2362,
// 2361 NA
// 2360,
- // 2359 NA
+ 2359,
// 2358 NA
2357,
// 2356,
@@ -109,7 +112,7 @@ static const int included_patches[] = {
2335,
2334,
2333,
- // 2332 NA
+ 2332,
2331,
2330,
2329,
@@ -135,9 +138,9 @@ static const int included_patches[] = {
2309,
// 2308 NA
2307,
- // 2306,
+ 2306,
2305,
- // 2304 NA
+ 2304,
2303,
// 2302 NA
// 2301 NA
@@ -160,7 +163,7 @@ static const int included_patches[] = {
2284,
2283,
// 2282 NA
- // 2281 NA
+ 2281,
2280,
2279,
// 2278 NA
@@ -199,13 +202,13 @@ static const int included_patches[] = {
// 2245,
// 2244,
// 2243 NA
- // 2242,
- // 2241,
- // 2240,
+ 2242,
+ 2241,
+ 2240,
// 2239,
// 2238 NA
2237,
- // 2236,
+ 2236,
2235,
// 2234 NA
2233,
@@ -232,7 +235,7 @@ static const int included_patches[] = {
2212,
// 2211 NA
// 2210 NA
- // 2209,
+ 2209,
2208,
// 2207 NA
// 2206 NA
@@ -260,23 +263,23 @@ static const int included_patches[] = {
2184,
2183,
// 2182 NA
- // 2181,
- // 2180,
- // 2179,
+ // 2181 NA
+ 2180,
+ 2179,
2178,
2177,
// 2176 NA
2175,
2174,
- // 2173,
+ 2173,
2172,
- // 2171,
- // 2170,
+ // 2171 NA
+ 2170,
2169,
// 2168 NA
// 2167 NA
// 2166 NA
- // 2165,
+ 2165,
2164,
2163,
2162,
@@ -289,7 +292,7 @@ static const int included_patches[] = {
// 2155 NA
// 2154 NA
// 2153 NA
- // 2152,
+ 2152,
2151,
// 2150 NA
2149,
@@ -337,7 +340,7 @@ static const int included_patches[] = {
2107,
2106,
// 2105 NA
- // 2104,
+ 2104,
2103,
// 2102 NA
2101,
diff --git a/src/nvim/version.h b/src/nvim/version.h
index 1de809e539..a0babfb156 100644
--- a/src/nvim/version.h
+++ b/src/nvim/version.h
@@ -1,6 +1,8 @@
#ifndef NVIM_VERSION_H
#define NVIM_VERSION_H
+#include "nvim/ex_cmds_defs.h"
+
// defined in version.c
extern char* Version;
extern char* longVersion;
diff --git a/src/nvim/vim.h b/src/nvim/vim.h
index cc0587fb88..f29ccdd296 100644
--- a/src/nvim/vim.h
+++ b/src/nvim/vim.h
@@ -11,20 +11,16 @@
#define RUNTIME_DIRNAME "runtime"
/* end */
-/* ============ the header file puzzle (ca. 50-100 pieces) ========= */
-
-#ifdef HAVE_CONFIG_H /* GNU autoconf (or something else) was here */
-# include "auto/config.h"
-# define HAVE_PATHDEF
+#include "auto/config.h"
+#define HAVE_PATHDEF
/*
* Check if configure correctly managed to find sizeof(int). If this failed,
* it becomes zero. This is likely a problem of not being able to run the
* test program. Other items from configure may also be wrong then!
*/
-# if (SIZEOF_INT == 0)
-Error: configure did not run properly.Check auto/config.log.
-# endif
+#if (SIZEOF_INT == 0)
+# error Configure did not run properly.
#endif
#include "nvim/os/os_defs.h" /* bring lots of system header files */
@@ -46,11 +42,6 @@ enum { NUMBUFLEN = 65 };
#include "nvim/keymap.h"
#include "nvim/macros.h"
-
-
-
-/* ================ end of the header file puzzle =============== */
-
#include "nvim/gettext.h"
/* special attribute addition: Put message in history */
@@ -213,6 +204,8 @@ enum {
#define DIALOG_MSG_SIZE 1000 /* buffer size for dialog_msg() */
+enum { FOLD_TEXT_LEN = 51 }; //!< buffer size for get_foldtext()
+
/*
* Maximum length of key sequence to be mapped.
* Must be able to hold an Amiga resize report.
diff --git a/src/nvim/window.c b/src/nvim/window.c
index 6020159af9..60bba19b07 100644
--- a/src/nvim/window.c
+++ b/src/nvim/window.c
@@ -1,3 +1,6 @@
+// This is an open source non-commercial project. Dear PVS-Studio, please check
+// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
+
#include <assert.h>
#include <inttypes.h>
#include <stdbool.h>
diff --git a/src/nvim/window.h b/src/nvim/window.h
index 2ac4c00c28..82b3fe5e88 100644
--- a/src/nvim/window.h
+++ b/src/nvim/window.h
@@ -3,6 +3,8 @@
#include <stdbool.h>
+#include "nvim/buffer_defs.h"
+
/* Values for file_name_in_line() */
#define FNAME_MESS 1 /* give error message */
#define FNAME_EXP 2 /* expand to path */